~ubuntu-branches/ubuntu/maverick/ploticus/maverick

« back to all changes in this revision

Viewing changes to doc/prefab_chron.html

  • Committer: Bazaar Package Importer
  • Author(s): James W. Penny
  • Date: 2002-04-10 23:02:04 UTC
  • Revision ID: james.westby@ubuntu.com-20020410230204-64em4ns2f57c5u3l
Tags: 2.0.3-1
* The "That Tears it, Now You Have to Update Docs Package" Release.
* New upstream release (well, not so new :-( )   closes: Bug#137578
* Correct missing libpng2-dev in build-depends.  closes: Bug#142205
* Use correct syntax to:
* close URL type.                                closes: Bug#137577
* fix Architecture                               closes: Bug#141657
* close ITP                                      closes: Bug#132878

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<head>
 
3
<!-- This file has been generated by unroff 1.0, 01/08/02 15:53:00. -->
 
4
<!-- Do not edit! -->
 
5
<STYLE TYPE="text/css">
 
6
<!--
 
7
        A:link{text-decoration:none}
 
8
        A:visited{text-decoration:none}
 
9
        A:active{text-decoration:none}
 
10
-->
 
11
</STYLE>
 
12
<title>ploticus: chron prefab</title>
 
13
<body bgcolor=D0D0EE vlink=0000FF>
 
14
<br>
 
15
<br>
 
16
<center>
 
17
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
 
18
<td>
 
19
  <table cellpadding=2 width=550><tr>
 
20
  <td><br><h2>chron prefab</h2></td>
 
21
  <td align=right>
 
22
  <small>
 
23
  <a href="../doc/Welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
 
24
  <a href="../doc/Welcome.html">Welcome</a> &nbsp; &nbsp;
 
25
  <a href="../gallery/index.html">Gallery</a> &nbsp; &nbsp;
 
26
  <a href="../doc/Contents.html">Handbook</a> 
 
27
  <td></tr></table>
 
28
</td></tr>
 
29
<td>
 
30
<br>
 
31
<br>
 
32
 
 
33
<title>Manual page for chron_prefab(PL)</title>
 
34
</head>
 
35
<body>
 
36
 
 
37
<p>
 
38
<a href="prefab_chron.html#manpage">
 
39
 Click here to skip over examples
 
40
</a>
 
41
 
 
42
<h2>EXAMPLE 1 - Dates</h2>
 
43
<center><table cellpadding=2><tr>
 
44
<td><img src="../gallery/prefab_img/chron1.gif"></td></tr>
 
45
</table></center>
 
46
<p>
 
47
<pre>
 
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
 
51
 
 
52
 
 
53
The data14 file:
 
54
        00/12/21 1
 
55
        00/12/22 1
 
56
        00/12/23 2
 
57
        00/12/27 1
 
58
        ...etc.
 
59
 
 
60
 
 
61
</pre>
 
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>
 
65
</table></center>
 
66
<p>
 
67
<pre>
 
68
 
 
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"
 
71
 
 
72
</pre>
 
73
 
 
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>
 
77
</table></center>
 
78
<p>
 
79
<pre>
 
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 
 
84
 
 
85
The data19 file:
 
86
  18 071301
 
87
  16 071401
 
88
  15 071501
 
89
  34 071601
 
90
  ...etc.
 
91
 
 
92
</pre>
 
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>
 
95
 
 
96
<br><br><br>
 
97
 
 
98
 
 
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>
 
102
</table></center>
 
103
<p>
 
104
<pre>
 
105
 
 
106
 
 
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 
 
110
 
 
111
 
 
112
</pre>
 
113
 
 
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>
 
117
</table></center>
 
118
<p>
 
119
<pre>
 
120
 
 
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"
 
124
 
 
125
 
 
126
The data16 file:
 
127
        01/09/05        09:43:35
 
128
        01/09/05        09:43:40
 
129
        01/09/05        13:15:00
 
130
        01/09/05        13:15:11
 
131
        ...etc.
 
132
 
 
133
Note that a file such as this (data13) could also be used, and timefld
 
134
would not need to specified:
 
135
        01/09/05.09:43:35
 
136
        01/09/05.09:43:40
 
137
        01/09/05.13:15:00
 
138
        01/09/05.13:15:11
 
139
        ..etc.
 
140
 
 
141
</pre>
 
142
 
 
143
<h2>EXAMPLE 6 - Times - tabulated by hour</h2>
 
144
<p>
 
145
<center><table cellpadding=2><tr>
 
146
<td><img src="../gallery/prefab_img/chron6.gif"></td></tr>
 
147
</table></center>
 
148
<p>
 
149
<pre>
 
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
 
153
 
 
154
 
 
155
The data15 file:
 
156
        07:47:49
 
157
        07:47:52
 
158
        07:47:54
 
159
        ..etc.
 
160
 
 
161
</pre>
 
162
 
 
163
<p>
 
164
<a href="prefabs.html#examples">
 
165
 How to run these examples
 
166
</a>
 
167
 
 
168
<a name=manpage></a>
 
169
 
 
170
<h2>DESCRIPTION</h2>
 
171
<b>chron</b> is a 
 
172
<a href="prefabs.html">
 
173
 prefab
 
174
</a>
 
175
for plotting chronological data.<tt> </tt>
 
176
Data may be expressed as
 
177
<a href="dates.html">
 
178
 dates
 
179
</a>
 
180
,
 
181
<a href="times.html">
 
182
 times
 
183
</a>
 
184
(seconds portion is optional)
 
185
,
 
186
or a combination of date and time called
 
187
<a href="scaleunits.html#datetime">
 
188
 datetime
 
189
</a>
 
190
 .<tt> </tt>
 
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>
 
195
 
 
196
<p>
 
197
 
 
198
<br><br><br>
 
199
 
 
200
<h2>PARAMETERS</h2>
 
201
<dl>
 
202
<dt><dd><p>
 
203
<a href="prefab_stdparms.html">
 
204
 Standard prefab parameters
 
205
</a>
 
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>
 
210
<b>xinc</b> supports 
 
211
<a href="axis.html#stubunits">
 
212
 constructs
 
213
</a>
 
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>
 
216
 
 
217
<br>
 
218
<br>
 
219
<dt><dd><p>
 
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">
 
223
 datetime
 
224
</a>
 
225
 .<tt> </tt>
 
226
 
 
227
<br>
 
228
<br>
 
229
<dt><dd><p>
 
230
<b>mode</b> is either <tt>bars</tt> (the default) or <tt>line</tt>.<tt> </tt>
 
231
 
 
232
<br>
 
233
<br>
 
234
<dt><dd><p>
 
235
<b>datefmt</b> is the 
 
236
<a href="dates.html">
 
237
 date format
 
238
</a>
 
239
you are using.  This must be specified unless 
 
240
using the default format (as set in a
 
241
<a href="config.html">
 
242
 config file
 
243
</a>
 
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>
 
247
 
 
248
<br>
 
249
<br>
 
250
<dt><dd><p>
 
251
<b>stubfmt</b> is the 
 
252
<a href="dates.html">
 
253
 date format
 
254
</a>
 
255
or
 
256
<a href="times.html">
 
257
 time format
 
258
</a>
 
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>
 
262
 
 
263
<br>
 
264
<br>
 
265
<dt><dd><p>
 
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>
 
269
 
 
270
<br>
 
271
<br>
 
272
<dt><dd><p>
 
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>
 
276
 
 
277
 
 
278
<br>
 
279
<br>
 
280
<dt><dd><p>
 
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>
 
286
 
 
287
<br>
 
288
<br>
 
289
<dt><dd><p>
 
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>
 
296
 
 
297
<br>
 
298
<br>
 
299
<dt><dd><p>
 
300
<b>timefld</b> specifies a 
 
301
<a href="attributetypes.html#dfield">
 
302
 data field
 
303
</a>
 
304
that holds time values.  
 
305
Normally when plotting 
 
306
<a href="scaleunits.html#datetime">
 
307
 datetimes
 
308
</a>
 
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.  
 
312
 
 
313
<br>
 
314
<br>
 
315
<dt><dd><p>
 
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>
 
320
 
 
321
<br>
 
322
<br>
 
323
<dt><dd><p>
 
324
<b>curve</b> may be specified as <tt>yes</tt> or as a
 
325
<a href="linedetails.html">
 
326
 linedetails value
 
327
</a>
 
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>
 
331
 
 
332
 
 
333
 
 
334
</dl>
 
335
<p>
 
336
If mode is <tt>bars</tt>:
 
337
<dl>
 
338
<dt><dd><p>
 
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>
 
342
 
 
343
<br>
 
344
<br>
 
345
<dt><dd><p>
 
346
<b>color</b> controls the 
 
347
<a href="color.html">
 
348
 color
 
349
</a>
 
350
of bars, if <tt>mode=bars</tt>.<tt> </tt>
 
351
 
 
352
<br>
 
353
<br>
 
354
<dt><dd><p>
 
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>
 
359
 
 
360
 
 
361
</dl>
 
362
<p>
 
363
If mode is <tt>line</tt>:
 
364
<dl>
 
365
<dt><dd><p>
 
366
<b>linedet</b> controls the
 
367
<a href="linedetails.html">
 
368
 appearance
 
369
</a>
 
370
of the line, if <tt>mode=line</tt>.<tt> </tt>
 
371
<br>
 
372
<br>
 
373
<dt><dd><p>
 
374
<b>step</b> may be given as <tt>yes</tt> to get a stairstep line.<tt> </tt>
 
375
<br>
 
376
<br>
 
377
<dt><dd><p>
 
378
<b>fill</b> may be given as a 
 
379
<a href="color.html">
 
380
 color
 
381
</a>
 
382
, resulting in the area under the line being filled.<tt> </tt>
 
383
<br>
 
384
<br>
 
385
<dt><dd><p>
 
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>
 
390
 
 
391
<br><br><br>
 
392
</dl>
 
393
<p>
 
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>
 
398
 
 
399
<br>
 
400
<br>
 
401
</td></tr>
 
402
<td align=right>
 
403
<a href="Welcome.html">
 
404
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
 
405
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
 
406
<br>
 
407
<br>
 
408
<center>
 
409
<img src="../gallery/all.gif">
 
410
</center>
 
411
</td></tr>
 
412
</table>
 
413
<p><hr>
 
414
Markup created by <em>unroff</em> 1.0,&#160;<tt> </tt>&#160;<tt> </tt>January 08, 2002.
 
415
</body>
 
416
</html>