ploticus: chron prefab

## chron prefab | Welcome Gallery Handbook |
| Manual page for chron_prefab(PL)

Click here to skip over examples

## 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.

## 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"

## EXAMPLE 3 - Dates - tabulated by week

    pl  -prefab chron  data=data14  x=1  y=2  datefmt=yy/mm/dd  xinc="14 days" \
         stubfmt=MMMdd  stubvert=yes  tab=week  tabmode=first  mode=line  ygrid=yes \
         step=yes  linedet="color=redorange width=2"  xrange="01/04/08 01/09/01"  \
         yrange="0 40"  title="# hits per week"

## 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

## 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.

## 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.

How to run these examples

## DESCRIPTION

chron is a prefab for plotting chronological data.`` Data may be expressed as dates , times (seconds portion is optional) , or a combination of date and time called datetime .`` chron can produce bar or line plots, and can plot explicit values or tabulate by week, month, day, hour, etc.`` Time is shown along the X axis.`` The data file must be in chronological order.``

## PARAMETERS

  standard prefab parameters are all supported except err. data and x are always required.`` Data field x must contain dates, times, or datetimes.`` Data field y may contain values.`` xinc supports constructs such as `"1 month"`; if only a number is given, it is assumed to be days (the default for xinc is 7 days).``

  unittype specifies the type of chronological scaling.`` Default is `date`. Allowable values are `time`, `datetime` and datetime .``

  mode is either `bars` (the default) or `line`.``

  datefmt is the date format you are using. This must be specified unless using the default format (as set in a config file , otherwise `mmddyy`).`` If plotting datetime values, datefmt specifies only the date portion.`` If plotting time values, datefmt is ignored.``

  stubfmt is the date format or time format to be used for X axis stubs.`` The defaults are `MMMdd` (date) and `HHa` (time).`` You can use `stubvert=yes` to render stubs vertically.``

  xyears allows years to be displayed along X axis below date X stubs. Use `yy` for 2 digit year eg 01, `yyy` for eg '01, and `yyyy` for eg `2001`.``

  omitweekends may be specified as `yes` to allow 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.``

  tab tabulates data by `hour`, `day`, `week`, `month`, `quarter-year`, or `year`. If a y data field is being used, the y values will be totaled; otherwise, instances will be counted.`` Tabulation is done by internally adjusting dates and then counting.``

  tabmode is used with tab.`` Allowable values are `mid` and `first` (default is `mid`).`` `mid` causes tabulations to be based on a date or time in the middle of the interval; for `first` the beginning of the interval is used.`` `mid` is appropriate for some types of plots while `first` is better for others.``

  timefld specifies a data field that holds time values. Normally when plotting datetimes , dates and times are combined into one data field, separated by a period (.).`` If timefld is used, however, dates may be in one data field (x) and times in another.

  nearest may be used to specify cutoffs for automatic scaling in X.`` For example, `nearest=month` would cause X min and max to fall on month boundaries.`` Allowable values are `hour`, `day`, `month`, `quarter`, and `year`.``

  curve may be specified as `yes` or as a linedetails value , and causes a moving average curve to be fit and drawn. order (default = 5) may be used to control the number of points considered when computing the moving average curve (higher value = smoother curve).``

If mode is `bars`:

  barwidth controls the width of bars This is a value in inches, or may be given as `line` for very thin bars.``

  color controls the color of bars, if `mode=bars`.``

  crossover may be specified as the value in Y where bars begin to point downward instead of upward. For instance, `crossover=0` is often useful when dealing with financial income, to show loss using downward bars.``

If mode is `line`:

  linedet controls the appearance of the line, if `mode=line`.``
  step may be given as `yes` to get a stairstep line.``

Note: Because filter processing is applied to data as they are read, tabulate cannot be set from within the data file.`` If tabulate is used, x, y and datefmt cannot be set from within the data file.``
data display engine
Copyright Steve Grubb

Markup created by unroff 1.0, `` `` September 17, 2001.