.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
-->
</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 "13-SEP-2001   PL www.sgpr.net"


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


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


.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).  The origin (0,0) is always at 
the \fBlower-left\fR corner.


.SH DATA SCALING UNITS
A number of scaling units are available.
Scaling is set in \fBproc areadef\fR or in \fBproc defineunits\fR.
.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.


.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 as of version 1.37).
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">
.>>
\fI printf-spec \fR
.ig >>
</a>
.>>

.SH LOG
.LP
Logarithmic numeric scale.
Numeric values may be any mixture of integer or floating point
(exponential/scientific notation is supported as of version 1.37).
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.


.SH CATEGORIES
.LP
Positioning by category.  
This scaling method differs from the others in that it does not
use a continuous scale.
It is useful in positioning bars, rangebars, 1-D scatterplots or 
symbols based on a value or category.
Values are considered labels and may be anything\(em they may even contain
embedded spaces and \fC\\n\fR.
No \fBproc areadef\fR range information should be specified; instead,
the categories are enumerated in an areadef \fCxcategories\fR or
\fCycategories\fR attribute.
Data are categorized by comparing with all category labels
until a match is found.
The details of how this comparison is actually done can be controlled using areadef
attribute \fCcatcompmethod\fR.
.LP
\fBDisplay format\fR - the defined category names.


.SH DATE
.LP
Allows date information to be plotted directly.  
A number of
.ig >>
<a href="dates.html">
.>>
date notations
.ig >>
</a>
.>>
 , including year/month and quarter year notations,
are supported for plotting and date arithmetic.
.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">
.>>
display 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.



.SH TIME
.LP
Allows date information to be plotted directly.  
Several 
.ig >>
<a href="times.html">
.>>
time formats
.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 >>
<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">
.>>
hitcount
.ig >>
</a>
.>>
(Introduced in version 1.3)

.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
\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 units may be used, but hour units 
may not be used.
.LP
An example of datetime scaling with time window is in
.ig >>
<a href="../gallery/hitcount3.htm">
.>>
hitcount3
.ig >>
</a>
.>>
(Introduced in version 1.3)


.SH PLTAB
.LP
Used only with the pltab utility.  
Similar to \fBcategories\fR type (see above).
When pltab scaling is in effect,
plottable values in Y correspond to row labels from the underlying table.  
Like the \fBcategories\fR scale type, it is primarily useful in aligning
bars etc.
For example if the following table were being processed
using pltab:
.nf
.ft C
               Dealerships

NH - North Hills

CV - Centerville

DT - Downtown
.fi
.ft R
the value \fCCV\fR would be scaled in Y to align with the "Centerville" row.


.SH PLTAB_ROW
Usage: \fBpltab_row\fR \fIrowval\fR
.LP
Used only with the pltab utility.  
Like \fBpltab\fR, except that it is used when aligning a \fB2-D\fR plot 
such as a bargraph or lineplot to a row in the table.  Effectively this
embeds a small Y axis into a row in the table.  \fIrowval\fR designates
which row in the table to align with (in the above example, "CV" could
be used for \fIrowval\fR).

.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="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>
.>>
