3
<!-- This file has been generated by unroff 1.0, 01/08/02 15:53:00. -->
5
<STYLE TYPE="text/css">
7
A:link{text-decoration:none}
8
A:visited{text-decoration:none}
9
A:active{text-decoration:none}
12
<title>ploticus: chron prefab</title>
13
<body bgcolor=D0D0EE vlink=0000FF>
17
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
19
<table cellpadding=2 width=550><tr>
20
<td><br><h2>chron prefab</h2></td>
23
<a href="../doc/Welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
24
<a href="../doc/Welcome.html">Welcome</a>
25
<a href="../gallery/index.html">Gallery</a>
26
<a href="../doc/Contents.html">Handbook</a>
33
<title>Manual page for chron_prefab(PL)</title>
38
<a href="prefab_chron.html#manpage">
39
Click here to skip over examples
42
<h2>EXAMPLE 1 - Dates</h2>
43
<center><table cellpadding=2><tr>
44
<td><img src="../gallery/prefab_img/chron1.gif"></td></tr>
48
pl -prefab chron data=data14 x=1 y=2 datefmt=yy/mm/dd xinc="1 month" \
49
stubfmt=M xyears=yyyy yrange="0 25" barwidth=line color=red \
50
title="# hits per day" omitweekends=yes
62
<h2>EXAMPLE 2 - Dates - tabulated by week</h2>
63
<center><table cellpadding=2><tr>
64
<td><img src="../gallery/prefab_img/chron2.gif"></td></tr>
69
pl -prefab chron data=data14 x=1 y=2 datefmt=yy/mm/dd xinc="1 month" \
70
stubfmt=M xyears=yyyy color=green tab=week title="# hits per week"
74
<h2>EXAMPLE 3 - Dates - tabulated by week</h2>
75
<center><table cellpadding=2><tr>
76
<td><img src="../gallery/prefab_img/chron3.gif"></td></tr>
80
pl -prefab chron data=data19 x=2 y=1 datefmt=mmddyy xinc="1 month" \
81
stubfmt=M xyears=yyyy color=green tab=week include2=annot \
82
title="# website visitors per week" rectangle="1 1 4 2.5" ygrid=yes \
83
mode=line step=yes fill=red
93
In the above example, notice that <b>rectangle</b> (new in 2.02) was used to set a smaller
94
size, and a file containing script code for the annotation is included.<tt> </tt>
99
<h2>EXAMPLE 4 - Dates - tabulated by month</h2>
100
<center><table cellpadding=2><tr>
101
<td><img src="../gallery/prefab_img/chron4.gif"></td></tr>
107
pl -prefab chron data=data14 x=1 y=2 datefmt=yy/mm/dd xinc="1 month" \
108
stubfmt=M xyears=yyyy color=powderblue tab=month tabmode=first \
109
nearest=month barwidth=0.2 curve=yes
114
<h2>EXAMPLE 5 - Datetimes - tabulated by hour</h2>
115
<center><table cellpadding=2><tr>
116
<td><img src="../gallery/prefab_img/chron5.gif"></td></tr>
121
pl -prefab chron data=data16 x=1 tab=hour datefmt=yy/mm/dd xinc="1 day" \
122
barwidth=line stubfmt=MMMdd unittype=datetime timefld=2 \
123
title="# hits per hour"
133
Note that a file such as this (data13) could also be used, and timefld
134
would not need to specified:
143
<h2>EXAMPLE 6 - Times - tabulated by hour</h2>
145
<center><table cellpadding=2><tr>
146
<td><img src="../gallery/prefab_img/chron6.gif"></td></tr>
150
pl -prefab chron data=data15 x=1 tab=hour unittype=time xinc="1 hour" \
151
nearest=hour barwidth=0.2 stubfmt=HHA \
152
title="# events per hour" color=coral
164
<a href="prefabs.html#examples">
165
How to run these examples
172
<a href="prefabs.html">
175
for plotting chronological data.<tt> </tt>
176
Data may be expressed as
177
<a href="dates.html">
181
<a href="times.html">
184
(seconds portion is optional)
186
or a combination of date and time called
187
<a href="scaleunits.html#datetime">
191
<b>chron</b> can produce bar or line plots, and can plot explicit values or
192
tabulate by week, month, day, hour, etc.<tt> </tt>
193
Time is shown along the X axis.<tt> </tt>
194
The data file must be in chronological order.<tt> </tt>
203
<a href="prefab_stdparms.html">
204
Standard prefab parameters
206
are all supported except <b>err</b>.
207
<b>data</b> and <b>x</b> are always required.<tt> </tt>
208
Data field <b>x</b> must contain dates, times, or datetimes.<tt> </tt>
209
Data field <b>y</b> may contain values.<tt> </tt>
211
<a href="axis.html#stubunits">
214
such as <tt>"1 month"</tt>; if only a
215
number is given, it is assumed to be days (the default for <b>xinc</b> is 7 days).<tt> </tt>
220
<b>unittype</b> specifies the type of chronological scaling.<tt> </tt>
221
Default is <tt>date</tt>. Allowable values are <tt>time</tt>, <tt>datetime</tt> and
222
<a href="scaleunits.html#datetime">
230
<b>mode</b> is either <tt>bars</tt> (the default) or <tt>line</tt>.<tt> </tt>
235
<b>datefmt</b> is the
236
<a href="dates.html">
239
you are using. This must be specified unless
240
using the default format (as set in a
241
<a href="config.html">
244
, otherwise <tt>mmddyy</tt>).<tt> </tt>
245
If plotting datetime values, <b>datefmt</b> specifies only the date portion.<tt> </tt>
246
If plotting time values, <b>datefmt</b> is ignored.<tt> </tt>
251
<b>stubfmt</b> is the
252
<a href="dates.html">
256
<a href="times.html">
259
to be used for X axis stubs.<tt> </tt>
260
The defaults are <tt>MMMdd</tt> (date) and <tt>HHa</tt> (time).<tt> </tt>
261
You can use <tt>stubvert=yes</tt> to render stubs vertically.<tt> </tt>
266
<b>xyears</b> allows years to be displayed along X axis below date X stubs.
267
Use <tt>yy</tt> for 2 digit year eg 01, <tt>yyy</tt> for eg '01, and <tt>yyyy</tt>
268
for eg <tt>2001</tt>.<tt> </tt>
273
<b>omitweekends</b> may be specified as <tt>yes</tt> to allow the graph to be
274
drawn such that Friday is followed immediately by Monday. Any data points
275
falling on a Saturday or Sunday are silently adjusted to the nearest weekday.<tt> </tt>
281
<b>tab</b> tabulates data
282
by <tt>hour</tt>, <tt>day</tt>, <tt>week</tt>, <tt>month</tt>, <tt>quarter-year</tt>, or <tt>year</tt>.
283
If a <b>y</b> data field is being used, the <b>y</b> values will be totaled;
284
otherwise, instances will be counted.<tt> </tt>
285
Tabulation is done by internally adjusting dates and then counting.<tt> </tt>
290
<b>tabmode</b> is used with <b>tab</b>.<tt> </tt>
291
Allowable values are <tt>mid</tt> and <tt>first</tt> (default is <tt>mid</tt>).<tt> </tt>
292
<tt>mid</tt> causes tabulations to be based on a date or time in the
293
middle of the interval; for <tt>first</tt> the beginning of the interval is used.<tt> </tt>
294
<tt>mid</tt> is appropriate for some types
295
of plots while <tt>first</tt> is better for others.<tt> </tt>
300
<b>timefld</b> specifies a
301
<a href="attributetypes.html#dfield">
304
that holds time values.
305
Normally when plotting
306
<a href="scaleunits.html#datetime">
309
, dates and times are combined into one data field, separated by a period (.).<tt> </tt>
310
If <b>timefld</b> is used, however,
311
dates may be in one data field (<b>x</b>) and times in another.
316
<b>nearest</b> may be used to specify cutoffs for automatic scaling in X.<tt> </tt>
317
For example, <tt>nearest=month</tt> would cause X min and max to fall on
318
month boundaries.<tt> </tt>
319
Allowable values are <tt>hour</tt>, <tt>day</tt>, <tt>month</tt>, <tt>quarter</tt>, and <tt>year</tt>.<tt> </tt>
324
<b>curve</b> may be specified as <tt>yes</tt> or as a
325
<a href="linedetails.html">
328
, and causes a moving average curve to be fit and drawn. <b>order</b>
329
(default = 5) may be used to control the number of points considered when
330
computing the moving average curve (higher value = smoother curve).<tt> </tt>
336
If mode is <tt>bars</tt>:
339
<b>barwidth</b> controls the width of bars
340
This is a value in inches,
341
or may be given as <tt>line</tt> for very thin bars.<tt> </tt>
346
<b>color</b> controls the
347
<a href="color.html">
350
of bars, if <tt>mode=bars</tt>.<tt> </tt>
355
<b>crossover</b> may be specified as the value in Y where bars begin
356
to point downward instead of upward. For instance, <tt>crossover=0</tt>
357
is often useful when dealing with financial income, to show loss
358
using downward bars.<tt> </tt>
363
If mode is <tt>line</tt>:
366
<b>linedet</b> controls the
367
<a href="linedetails.html">
370
of the line, if <tt>mode=line</tt>.<tt> </tt>
374
<b>step</b> may be given as <tt>yes</tt> to get a stairstep line.<tt> </tt>
378
<b>fill</b> may be given as a
379
<a href="color.html">
382
, resulting in the area under the line being filled.<tt> </tt>
386
<b>gapmissing</b> may be specified as <tt>yes</tt> or <tt>small</tt>.<tt> </tt>
387
If <tt>yes</tt>, missing data will cause a gap in the line (normally
388
the line connects plottable points without a gap). <tt>small</tt> is
389
the same as <tt>yes</tt> except that it leaves a small overhang.<tt> </tt>
394
Note: Because filter processing is applied to data as they are read,
395
<b>tabulate</b> cannot be set from within the data file.<tt> </tt>
396
If <b>tabulate</b> is used, <b>x</b>, <b>y</b> and <b>datefmt</b> cannot
397
be set from within the data file.<tt> </tt>
403
<a href="Welcome.html">
404
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine <br>
405
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
409
<img src="../gallery/all.gif">
414
Markup created by <em>unroff</em> 1.0, <tt> </tt> <tt> </tt>January 08, 2002.