File: prefab_chron.html

package info (click to toggle)
ploticus-doc 2.40-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 9,604 kB
  • ctags: 159
  • sloc: pascal: 469; makefile: 63; sh: 11
file content (417 lines) | stat: -rw-r--r-- 13,664 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
<html>
<head>
<!-- This file has been generated by unroff 1.0, 01/15/08 14:06:28. -->
<!-- Do not edit! -->
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>ploticus: chron prefab</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550><tr>
<td>
  <table cellpadding=2 width=550><tr>
  <td><br><h2>chron prefab</h2></td>
  <td align=right>
  <small>
  <a href="../doc/welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
  Version 2.40 Jan'08
     </small><br><a href="../doc/prefabs.html">Prefabs</a>
  <td></tr></table>
</td></tr>
<td>
<br>
<br>

<title>Manual page for chron_prefab(PL)</title>
</head>
<body>

<center><a href="prefab_chron_ex.html"><img src="../gallery/prefab_img/chron7thm.gif" border=0>
 <br><b>View the chron prefab examples</a></b><br><br></center>

<p>
<b>chron</b> is a 
<a href="prefabs.html">
 prefab
</a>
for plotting chronological data.<tt> </tt>
Data may be expressed as
<a href="dates.html">
 dates,
</a>
<a href="times.html">
 times,
</a>
or a combination of date and time called
<a href="scaleunits.html#datetime">
 datetime.<tt> </tt>
</a>
<b>chron</b> can produce bar or line plots (1 to 4 bar sets or lines).<tt> </tt>
It can also tabulate by week, month, day, hour, etc. (see the <b>tab</b> parameter).<tt> </tt>
Time is shown along the X axis.<tt> </tt>
The data file must be in chronological order.<tt> </tt>

<br><br><br>

<h2>Parameters</h2>


<table cellpadding=2 bgcolor=A0A0A0 width=600>

<tr bgcolor=FFFFEC align=center><td><b>Prefab<br>parameter<br>name</td><td>Data type</td>
<td>Default</td><td>Description</td>
<td>Examples<br><small>(ignore line wrapping)</td></tr>


<tr bgcolor=FFFFFF>
<td><b><a href="prefab_stdparms.html">Standard parameters</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td colspan=2>Any of the <a href="prefab_stdparms.html">standard prefab parameters</a> may be used.
You <font color=D00000>must specify</font> <b>data</b> (the name of the input data file).
X axis stub format, increment, and range should use reasonable defaults automatically (versions 2.31+);
if desired you can override the defaults by specifying <b>xstubfmt</b>, <b>xinc</b>, or <b>xnearest</b>
explicitly.
</td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>x</td>
<td><a href="atypes.html#dfield">data field</a></td>
<td><font color=D00000>must be specified</font></td>
<td>Identifies the data field which contains <a href="scaleunits.html">dates, times, or datetimes</a>.</td>
<td><tt>x=2<br>x=tdate</td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>y<br>y2<br>y3<br>y4</td>
<td><a href="atypes.html#dfield">data field</a></td>
<td><b>y</b> <font color=D00000>must be specified</font> 
(except when <b>tab</b>ulating)</td>
<td>Identifies the data field(s) that contain values to plot.
If you're not <b>tab</b>ulating (see below), <b>y</b>, <b>y2</b>, <b>y3</b>, and
<b>y4</b> are available to produce one, two, three, or four curves or bar sets, respectively, and all values must be numeric.
If you are <b>tab</b>ulating only one <b>y</b> is available, and it can contain alpha or numeric data.</td>
<td><tt>y=3<br><br>y=bp1 y2=bp2 y3=baseline</td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>datefmt</td>
<td>a <a href="dates.html">date format</a></td>
<td><font color=D00000>must be specified</font>,unless plotting time values only.</td>
<td>Specifies the date notation present in the <b>x</b> field of your data.
If plotting datetime values, specify only the date portion.</td>
<td><tt>datefmt=dd-mmm-yyyy</td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>err<br>err2<br>err3<br>err4</td>
<td><a href="atypes.html#dfield">data field</a></td>
<td>&nbsp;</td>
<td>Identifies the data field(s) that contain numeric error amounts, such as standard deviations, for the error bars.
<b>err2</b>, <b>err3</b>, and <b>err4</b> are available for producing error bars on additional curves or bar sets.</td>
<td><tt>err=5</tt></td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>mode</td>
<td><tt>bars</tt><br>or<br><tt>line</tt></td>
<td><tt>bars</td>
<td>Type of plot to render.</td>
<td><tt>type=line</td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>unittype</td>
<td><tt>date</tt><br>or<br><tt>time</tt><br>or<br><tt>datetime</tt>
<td><tt>date</td>
<td>Specifies the type of chronological scaling, and should
be the same as the datatype of your <b>x</b> field.
<a href="scaleunits.html#datetime">Datetime with windowing</a>
specs can also be used here.</td>
<td><tt>unittype=datetime</tt></td></tr>


<tr bgcolor=FFFFFF>
<td><b>autoyears <br> automonths <br> autodays</td>
<td><tt>yes</tt><br>or<br><tt><i>format</i></td>
<td>&nbsp;</td>
<td>These may be used to automatically mark year, month, or day boundaries
along the X axis.  For example, if your X axis increment is months, you can use <tt>autoyears=yes</tt>
to display the year below each year transition.  
You can specify <tt>yes</tt> or an appropriate <a href="dates.html">display format</a>.
<a href="axis.html#autoyears">More information</a>.
Note: The old name for <b>autoyears</b> is <b>xyears</b>.</td>
<td><tt>autoyears=yes</tt><br><br><tt>automonths=Mmm</tt></td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>omitweekends</td>
<td><tt>yes</tt> or <tt>no</tt></td>
<td><tt>no</td>
<td>If <tt>yes</tt>, allows the graph to be 
drawn such that Friday is followed immediately by Monday.  Any data points
falling on a Saturday or Sunday are silently adjusted to the nearest weekday.</td>
<td><tt>omitweekends=yes</tt></td>
</tr>


<tr bgcolor=FFFFFF>
<td><b>tab</b></td>
<td>One of: <tt>hour day week month quarter-year year</td>
<td>&nbsp;</td>
<td><nobr>If specified, data will be tabulated on week, month, etc.</nobr>
For example, if your data has a number of entries for June 10, 2003 you can use this 
to plot one bar showing the number of entries for that date.
If a <b>y</b> data field is being used, the <b>y</b> values will be summated.
If no <b>y</b> data field has been specified, instances (rows) will be counted.
<b>tab</b> is incompatible with <b>y2 .. 4</b> and <b>ptselect</b>.
Note: <b>tab</b> (as well as related parameters <b>x</b>, <b>y</b>, <b>datefmt</b>)
cannot be #set from within the data file.</td>
<td><tt>tab=week</td>
</tr>


<tr bgcolor=FFFFFF>
<td><b>tabmode</td>
<td><tt>mid</tt><br>or<br><tt>first</td>
<td><tt>mid</td>
<td>This parameter is used with <b>tab</b> and influences how date adjustment will be done.
<tt>mid</tt> causes dates/times to be adjusted to the middle of the interval.
<tt>first</tt> causes dates/times to be adjusted to the beginning of the interval.
<td><tt>tabmode=first</td>
</tr>


<tr bgcolor=FFFFFF>
<td><b>timefld</td>
<td><a href="atypes.html#dfield">data field</a></td>
<td>&nbsp;</td>
<td>Specifies a data field that holds time values.  Normally when plotting 
<a href="scaleunits.html#datetime">datetimes</a>
the date and time are combined into one data field, separated by a period (.),
but you can use <b>timefld</b> to allow the date and the time to be in two separate fields.
This parameter is available only with <b>tab</b>. </td>
<td><tt>timefld=ptime</td>
</tr>


<tr bgcolor=FFFFFF>
<td><b>xnearest</td>
<td>One of: <tt> hour  day  month  quarter year </td>
<td>&nbsp;</td>
<td>
This may be used to force X axis min and max to be located on round value boundaries.
For example, <tt>nearest=month</tt> would cause X min and max to be located at
month boundaries.  Old name: <b>nearest</b>.</td>
<td><tt>xnearest=month</td>
</tr>


<tr bgcolor=FFFFFF>
<td><b>xmargin</td>
<td>amount</td>
<td>&nbsp;</td>
<td>
When you are doing bars, <b>chron</b> may pad the X axis min and max.  
For example if your data are datetime
and you are doing bars, it will add an extra day on either end.  
Sometimes this is what is desired, but if not, you can use <tt>xmargin=0</tt> to suppress this.
You can also use this to add more padding at X axis min and max.
<i>amount</i> is in days for date and datetime, and minutes for time.
</td>
<td><tt>xmargin=0</td>
</tr>


<tr bgcolor=FFFFFF>
<td><b>curve</td>
<td><tt>yes</tt><br>or<br><a href="linedetails.html">linedetails</a></td>
<td>&nbsp;</td>
<td>Causes a moving average curve to be generating using the first set of data points (only).
<b>curve</b> should not be confused with the lines being drawn with
<tt>mode=line</tt>.. it is a completely separate operation.</td>
<td><tt>curve=" color=blue width=0.5"</td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>order</td>
<td>integer</td>
<td><tt>5</td>
<td>This is an additional parameter that may be used to control the number of points considered when 
computing the moving average curve (higher value = smoother curve).  </td>
<td><tt>order=10</td>
</tr>

</table>

<br>
<br>
<br>

<font size=+1><b>Parameters available when <tt>mode=bars</tt></b></font><br>
If more than one bar set is being rendered, bars will be clustered unless 
the <b>stack</b> parameter is specified.

<table cellpadding=2 bgcolor=A0A0A0 width=600>
<tr bgcolor=FFFFEC align=center><td><b>Prefab<br>parameter<br>name</td><td>Data type</td>
<td>Default</td><td>Description</td>
<td>Examples<br><small>(ignore line wrapping)</td></tr>


<tr bgcolor=FFFFFF>
<td><b>color<br><br>color2<br>color3<br>color4</td>
<td><a href="color.html">color</a></td>
<td><tt>gray</td>
<td>Specify bar color(s).</td>
<td><tt>color=dullyellow</td>
</tr>


<tr bgcolor=FFFFFF>
<td><b>barwidth</td>
<td><i>width</i><br>or<br><tt>line</tt></td>
<td>based on data, single bars</td>
<td>Controls the width of bars.
<i>width</i> is a value in <a href="atypes.html#punits">inches or cm</a>.
Or, <tt>line</tt> may be specified to render very thin bars.
Note: generally the default bar width is acceptable for single bars,
but for clusters it usually must be specified explicitly.</td<
<td><tt>barwidth=0.2 <br><br> barwidth=line</td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>stack</td>
<td><tt>yes</tt> or <tt>no</tt></td>
<td><tt>no</td>
<td>If <tt>yes</tt>, show stacked bars instead of bar clusters.
Note: <b>ptselect</b> cannot be used with stacked bars.  </td>
<td><tt>stack=yes</td>
</tr>


<tr bgcolor=FFFFFF>
<td><b>outline</td>
<td><tt>yes</tt><br>or<br><a href="linedetails.html">linedetails</a></td>
<td>&nbsp;</td>
<td>Outline the bars.</td>
<td><tt>"outline= color=pink"</td>
</tr>


<tr bgcolor=FFFFFF>
<td><b>crossover</td>
<td>value in Y</td>
<td>&nbsp;</td>
<td>This may be specified as the value in Y where bars begin
to point downward instead of upward.  For instance, <tt>crossover=0</tt>
is often useful when dealing with financial income, to show loss
using downward bars.</td>
<td><tt>crossover=0</td>
</tr>
</table>

<br>
<br>
<br>

<font size=+1><b>Parameters available when <tt>mode=line</tt></b></font><br>
<table cellpadding=2 bgcolor=A0A0A0 width=600>
<tr bgcolor=FFFFEC align=center><td><b>Prefab<br>parameter<br>name</td><td>Data type</td>
<td>Default</td><td>Description</td>
<td>Examples<br><small>(ignore line wrapping)</td></tr>


<tr bgcolor=FFFFFF>
<td><b>linedet<br><br>linedet2<br>linedet3<br>linedet4</td>
<td><a href="linedetails.html">linedetails</a></td>
<td><tt>width=1 color=black</td>
<td>Controls the appearance of rendered line(s).
If doing multiple lines you can specify <tt>linedet2</tt> without having to specify <tt>linedet</tt> (etc.)
</td>
<td><tt>"linedet= color=red width=0.5"</td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>fill <br><br>fill2<br>fill3<br>fill4</td>
<td><a href="color.html">color</a></td>
<td>&nbsp;</td>
<td>If specified, the area under the line will be filled with the specified color.
If doing multiple lines you can specify <tt>fill2</tt> without having to specify <tt>fill</tt> (etc.)
</td>
<td><tt>fill=dullyellow</td>
</tr>



<tr bgcolor=FFFFFF>
<td><b>step</td>
<td><tt>yes</tt> or <tt>no</tt></td>
<td><tt>no</td>
<td>Render a stairstep line.  Applies to all lines.</td>
<td><tt>step=yes</td>
</tr>


<tr bgcolor=FFFFFF>
<td><b>gapmissing</td>
<td><tt>yes</tt><br>or<br><tt>small</td>
<td>&nbsp;</td>
<td>If <tt>yes</tt>, unplottable data values will trigger a gap to occur in the line (normally
the line connects plottable points without a gap).  <tt>small</tt> is
the same as <tt>yes</tt> except that it leaves a small overhang.
Applies to all lines.
Note that this doesn't detect data points that are simply omitted; a non-plottable value
(such as a <tt>NA</tt> missing data code) must be present in the data.
</td>
<td><tt>gapmissing=small</td>
</tr>

<tr bgcolor=FFFFFF>
<td><b>lineclip</td>
<td><tt>yes</tt><br>or<br><tt>no</td>
<td><tt>no</tt></td>
<td>If <tt>yes</tt>, the lineplot will be clipped to the plotting area.
</td>
<td><tt>lineclip=yes</td>
</tr>

</table>


<br>
<br>
</td></tr>
<td align=right>
<a href="../doc/welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif"> 
</center>
</td></tr>
</table>
<br>
<center>
Ploticus is hosted at http://ploticus.sourceforge.net <br>
<img src="http://sourceforge.net/sflogo.php?group_id=38453" width="88" height="31" border="0" alt="SourceForge Logo">
</center>
<p><hr>
Markup created by <em>unroff</em> 1.0,&#160;<tt> </tt>&#160;<tt> </tt>January 15, 2008.
</body>
</html>