|
proc getdata
is used to read or specify plotting data.
proc trailer
may be used to place larger amounts of embedded plot data
at the end of the script file, to get it out of the way.
Ploticus can read tabular data from files, from command results, or data may be
embedded in the ploticus script.
Plotting from data fieldsPlotting and data display operations are done using fields. Taking a look at the first example data set below, we might draw a bar graph using the values in field 2, and draw error bars using the values in field 3. The bars could be labeled with the values in field 4, or perhaps field 1.
If your data exists in a state such that additional processing is
required in order to display it in a desired way, you may be able
to manipulate it after it is read by ploticus, using
proc processdata
, to perform accumulation, tabulation and counting, rewriting
as percents, computation of totals, reversing record order,
rotation of row/column matrix, break processing, etc.
Recognized data formatsData files or streams should be plain ascii text, not binary, and should be organized as a collection of rows having one or more fields. Fields may have numeric or alphanumeric content and may be delimited in one of these ways:
Notes: Data that is specified within a script is subject to script processing: leading white space is stripped off and the script interpreter will attempt to evaluate constructs that look like operators or variables. Empty rows and commented rows are ignored (the comment marker may be specified via proc getdata ) . Data sets with variable number of fields may be accomodated by specifying proc getdata attribute nfields. Otherwise, the first usable row will dictate the expected number of fields per record. If a row has more than the expected number of fields, extra fields are silently ignored. If a row has less than the expected number of fields, blank fields are silently added until the record has same number of fields as other records. nfields may also be used to read only the first few fields on every row, and ignore the rest. Leading white space is allowed when using spacequoted or whitespace delimitation. It is not allowed on the other types. Each row, including the last one, should be terminated with the standard line terminator for your system. For unix systems this is the newline character. For Win32 it is CR/LF; these are handled properly by MingW builds but not by unix builds.
The data parser was improved for version 2.02; earlier versions did not support zero-length
fields or data sets with variable number of fields.
Missing dataMissing data values may be represented using a code or by a zero-length field, if the specific delimitation method allows them. When plotting, missing values are generally skipped over, but exactly what occurs depends on what kind of plot operation is being done. The individual plotting proc manual pages give details.Embedded #set statementsData files may contain embedded #set statements for setting ploticus variables directly from the data file. The syntax is:
ExamplesGallery examples include:scat7.dat (white-space delimited) stock.csv (comma delimited) timeline3 (data specified within script) km2 (data specified within script). |
![]() data display engine Copyright Steve Grubb ![]() |