.ig >>
<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: scale units</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>scale units</h2></td>
  <td align=right>
  <small>
  <a href="../doc/Welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
  <a href="../doc/Welcome.html">Welcome</a> &nbsp; &nbsp;
  <a href="../gallery/index.html">Gallery</a> &nbsp; &nbsp;
  <a href="../doc/Contents.html">Handbook</a> 
  <td></tr></table>
</td></tr>
<td>
<br>
<br>
.>>

.TH scale_units PL "21-MAY-2003   PL ploticus.sourceforge.net"


.SH DESCRIPTION
A number of types of scaling units may be
used when plotting data.  They are described here.

.ig >>
<br><br><br>
.>>

.SH EXAMPLES
A number of examples illustrating the various scale types 
may be veiwed from the 
Gallery Scaling and Axes page
.ig >>
<a href="../gallery/gall.sa.html"><img src="../gallery/btn/here.gif"></a>
.>>

.ig >>
<br><br><br>
.>>

.SH ABSOLUTE UNITS
\fBAbsolute\fR units are not used for plotting data 
but rather for defining plot areas and for purposes
such as placing annotation, etc.  
Absolute space is measured in inches (or centimeters if
set in the config file, proc settings, or using the \fC-cm\fR command line 
option).  The origin (0,0) is always at 
the \fBlower-left\fR corner.
A location is said to be in "absolute space" if its coordinates are expressed in
inches (or cm) from the lower-left corner.

.ig >>
<br><br><br>
.>>

.SH DATA SCALING UNITS
A number of scaling units are available.
Scaling is set in \fBproc areadef\fR or in \fBproc defineunits\fR.
A location is said to be in "scaled space" or "data space" if its coordinates are
expressed in the scaled units that have been specified.
.LP
The following are the available types of scaling.
For each type a description is given.  Each type also
has one or more display format specifications,
which determine how incremental stubs will be presented.

.ig >>
<br><br><br>
.>>

.SH Linear
.LP
Standard linear numeric scale.
Numeric values may be any mixture of integer or floating point
(exponential/scientific notation e.g. 4.336e11 is supported).
Linear scaling is used for plotting continuous numeric data;
it may also be used with series, such as bars when no
location value is present in the data, or lineplots
when no X value is present in the data.
.LP
\fBDisplay format\fR:
Display of numerics
is controlled using a 
.ig >>
<a href="attributetypes.html#printfspec">
.>>
\0printf-spec
.ig >>
</a>
.>>

.ig >>
<br><br><br>
.>>

.SH Log
.LP
Logarithmic numeric scale.
Numeric values may be any mixture of integer or floating point
(exponential/scientific notation is supported).
The log of 0.0 or of negative numbers is nonexistant;
therefore log plots should have a minima > 0 (very small
numbers such as 0.01 are OK).
.LP
Also available is \fBlog+1\fR scaling, which is similar to \fBlog\fR
but uses \fClog( value+1 )\fR.  This is useful for log-characteristic data 
that can include values at or near 0.0.
.LP
If using log scaling along with autorange, and if values
of 0.0 are found, log+1 scaling will automatically be used.
.LP
\fBDisplay format\fR - same as linear, above.
.LP
The proc axis \fCstubcull\fR attribute may be useful in eliminating "stub pile-up"
when rendering log axes.

.ig >>
<br><br><br>
.>>

.ig >>
<a name=categories></a>
.>>

.SH Categories
.LP
Positioning using categorical bins rather than a continuous scale.
The categories themselves are alphanumeric labels.
This scaletype is often useful in positioning bars, rangebars, etc.
Categories are defined using
.ig >>
<a href="categories.html">
.>>
\0proc categories
.ig >>
</a>
.>>
before invoking proc areadef
(version 2.11 on), or from within
.ig >>
<a href="areadef.html">
.>>
\0proc areadef.
.ig >>
</a>
.>>
Category names generally are short (less than 40 chars long); they
may contain embedded whitespace but this may be problematic if a
category name will be used as a
.ig >>
<a href="attributetypes.html#locvalue">
.>>
\0plotvalue or locvalue.
.ig >>
</a>
.>>
.LP
\fBDisplay format\fR - the defined category names.

.ig >>
<br><br><br>
.>>

.SH Date
.LP
Allows date information to be plotted directly.  A number of
.ig >>
<a href="dates.html">
.>>
\0date notations
.ig >>
</a>
.>>
(including year/month and quarter year notations)
are supported for plotting and date arithmetic.
It is possible to omit weekends if desired - see
.ig >>
<a href="settings.html">
.>>
\0proc settings.
.ig >>
</a>
.>>

.LP
\fBDisplay format\fR: Dates may be displayed in
any of the supported date arithmetic formats,
or in a number of additional 
.ig >>
<a href="dates.html#display">
.>>
\0display formats
.ig >>
</a>
.>>
.LP
The basic date unit is always a \fBday\fR, regardless
of which notation is in use.  Stub and tic increments
may be expressed in \fCmonths\fR or \fCyears\fR, if desired.


.ig >>
<br><br><br>
.>>

.SH Time
.LP
Allows date information to be plotted directly.  Several 
.ig >>
<a href="times.html">
.>>
\0time notations
.ig >>
</a>
.>>
are supported for plotting and time arithmetic.
.LP
\fBDisplay format\fR: Times may be displayed in any of
the supported time arithmetic formats.
.LP
The basic time unit is a \fBminute\fR.

.ig >>
<br><br><br>
.>>
.ig >>
<a name=datetime></a>
.>>

.SH Datetime
.LP
Allows time information to be plotted across multiple days.
A datetime data field should have the format \fIdate\fR.\fItime\fR
(i.e. the date and time are connected using a dot).  
If your data has the date and time in two separate fields,
the proc getdata \fCfilter\fR attribute may be used to
connect them with a dot.
.LP
The date and time formats may be any of those supported for
plotting and arithmetic.
For example, if your datetime fields are like this:
\fC22Aug1999.16:44\fR you would specify the datetime
format as \fCddMmmyyyy.hh:mm\fR.
.LP
\fBDisplay format\fR: Same as above, except that the date
component or the time component may be omitted if desired.
.LP
The basic datetime unit is a \fBday\fR.
.LP
An example of datetime scaling is in 
.ig >>
<a href="../gallery/hitcount.htm">
.>>
\0hitcount
.ig >>
</a>
.>>

.ig >>
<br><br><br>
.>>

.SH Datetime with time windowing
.LP
Sometimes it is desirable to show only portions of each day, when showing
the entire 24 hour day would be too much. Examples of this include a work
day or a trading day. \fBdatetime\fR scaling allows you to do this- you can
indicate the time range for each day at the end of the datetime keyword.
For example:
.IP \0
\fCdatetime9-17\fR 
.br
would show only the hours from 9:00 to 17:00 for each day.  
.LP
\fBRules:\fR Only whole hours may be used in the time window definition.
Time values that are outside the
defined time window will be displayed at the time window boundary and a warning will be 
issued.  The areadef range must contain time components that are within the
time window range.  Incremental axis labels in day, hour, or minutes units may be used.
The end of one day and the beginning of the next day happen at the same point, and
the next day stub takes presidence.
.LP
An example of datetime scaling with time window is in
.ig >>
<a href="../gallery/hitcount3.htm">
.>>
\0hitcount3
.ig >>
</a>
.>>


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