|
These examples all use
the chron prefab.
All of these examples are included in the distribution (./pltestsuite/testpf_chron).
Gallery of ALL prefab examples
chron example 1 - dates
pl -prefab chron data=data14 x=1 y=2 datefmt=yy/mm/dd xinc="1 month" \ stubfmt=M xyears=yyyy yrange="0 25" barwidth=line color=red \ title="# hits per day" omitweekends=yes The data14 file: 00/12/21 1 00/12/22 1 00/12/23 2 00/12/27 1 ...etc. chron example 2 - dates - tabulated by week
pl -prefab chron data=data14 x=1 y=2 datefmt=yy/mm/dd xinc="1 month" \ stubfmt=M xyears=yyyy color=green tab=week title="# hits per week" chron example 3 - dates - tabulated by week
pl -prefab chron data=data19 x=2 y=1 datefmt=mmddyy xinc="1 month" \ stubfmt=M xyears=yyyy color=green tab=week include2=annot \ title="# website visitors per week" rectangle="1 1 4 2.5" ygrid=yes \ mode=line step=yes fill=red The data19 file: 18 071301 16 071401 15 071501 34 071601 ...etc.In the above example, notice that rectangle (new in 2.02) was used to set a smaller size, and a file containing script code for the annotation is included. chron example 4 - dates - tabulated by month
pl -prefab chron data=data14 x=1 y=2 datefmt=yy/mm/dd xinc="1 month" \ stubfmt=M xyears=yyyy color=powderblue tab=month tabmode=first \ nearest=month barwidth=0.2 curve=yes chron example 5 - datetimes - tabulated by hour
pl -prefab chron data=data16 x=1 tab=hour datefmt=yy/mm/dd xinc="1 day" \ barwidth=line stubfmt=MMMdd unittype=datetime timefld=2 \ title="# hits per hour" The data16 file: 01/09/05 09:43:35 01/09/05 09:43:40 01/09/05 13:15:00 01/09/05 13:15:11 ...etc. Note that a file such as this (data13) could also be used, and timefld would not need to specified: 01/09/05.09:43:35 01/09/05.09:43:40 01/09/05.13:15:00 01/09/05.13:15:11 ..etc. chron example 6 - times - tabulated by hour
pl -prefab chron data=data15 x=1 tab=hour unittype=time xinc="1 hour" \ nearest=hour barwidth=0.2 stubfmt=HHA \ title="# events per hour" color=coral The data15 file: 07:47:49 07:47:52 07:47:54 ..etc. chron example 7 - hourly temperature readings plotted for one week
pl -prefab chron data=data22 header=yes x=1 y=2 datefmt=mm/dd/yyyy \ xinc="1 day" mode=line unittype=datetime title="temperatures this week" The data22 file has data for one week and begins like this: datetime temp 12/08/2002.00:00 22 12/08/2002.06:00 24 12/08/2002.12:00 31 12/10/2002.00:00 30 chron example 8 - multiple curves
pl -prefab chron data=data24 header=yes unittype=datetime mode=line\ datefmt=mm/dd/yyyy x=dt y=airtemp y2=soiltemp y3=watertemp \ xinc="1 day" legendfmt=singleline The data24 file looks like this: dt airtemp soiltemp watertemp 12/08/2002.06:00 24 27 16 12/09/2002.00:00 25 27 16 12/10/2002.00:00 30 27 15 12/11/2002.00:00 32 32 15 12/12/2002.00:00 40 37 16 12/13/2002.00:00 19 27 15 12/14/2002.00:00 14 18 13
In version 2.20 the ability to render multiple curves or bar sets was introduced.
This can be done so long as tabulation is not being performed.
|
![]() data display engine Copyright Steve Grubb ![]() |