.TH DATAFORMATS PL "Ploticus data display engine"

.ig >>
<center>
<b>Ploticus data display engine</b> <small><a href="Copyright.html">Copyright Steve Grubb</a><br></small><br>
<a href="../doc/Welcome.html"><img src="../gallery/btn/welcome.gif"></a>
<a href="../gallery/index.html"><img src="../gallery/btn/gallery.gif"></a>
<a href="../doc/Contents.html"><img src="../gallery/btn/handbook.gif"></a>
<br><h1>Ploticus input data formats</h1>
</center>
.>>
 
.SH NAME
dataformats

.SH DESCRIPTION
Plotting is done based on data.  The
plot data may be specified within a ploticus script, or it may
be contained in a file, or be the result of executing a shell command.
\fBproc getdata\fR is used to specify or read in plotting data.
.LP
Ploticus uses \fBfield-oriented\fR data.  Most plotting is done
based on fields.  For example, a bargraph can be rendered based
upon the values in field #2 of each row of data.  A set of data
should contain one or more rows (lines).
.LP
Fields may be delimited in one of three ways:
.IP \(bu
\fBwhite-space\fR (any combination of spaces or tabs)
.IP \(bu
\fBcomma\fR (often called spreadsheet or .csv)
.IP \(bu
\fBtab\fR 
.LP
Fields may be surrounded by \fB"double quotes"\fR; this must be done
when a field contains embedded delimiter characters.
.LP
The number of fields should be consistent across records.
A comment character (specified as a \fBproc getdata\fR attribute) 
may be given as the first character
on a line; it causes that line to be ignored.

.SH EXAMPLES
Gallery examples include:
.br
.ig >>
<a href="../gallery/scat7.dat">
.>>
scat7.dat
.ig >>
</a>
.>>
(white-space delimited)
.br
.ig >>
<a href="../gallery/stock.csv">
.>>
stock.csv
.ig >>
</a>
.>>
(comma delimited)
.br
.ig >>
<a href="../gallery/timeline3.htm">
.>>
timeline3
.ig >>
</a>
.>>
(data specified within script)
.br
.ig >>
<a href="../gallery/km2.htm">
.>>
km2
.ig >>
</a>
.>>
(data specified within script).


.SH DETAILS
.LP
The plotting procedures generally access specific fields and process 
the data from top to bottom.  For example, a bar graph might be made
by drawing one bar for each data record based on the value
in field 2.
.LP
.ig >>
<a href="getdata.html">
.>>
Proc getdata
.ig >>
</a>
.>>
is used to read in a data file for plotting.
After \fBproc getdata\fR has been executed,
the plotting procedures can access the data by 
record and field.
