(BioCompanion v3.5)
PLOTTER | |||
|
|
|
||
We now proceed to this rather sophistication operation and will process more than one data file.
We use our example file ( data (example5a.dat, example5b.dat) for this purpose:
We start with the following file ("example5.str") as a start: Like the second, we may now add the third, fourth, etc. data set by adding more LOCAL sections.
It does not matter whether we respecify the same file or take a different file name. The number
of files is unlimited. Keep in mind, owever, that the plot might get crowded easily.
For this example, we add a third data file ( example5b.dat ) and will
now have three curves: a red, blue, and a magenta line. Despite the fact that we used different
colors, the plot becomes crowded! Therefore, we insert a
statement in front of the blue line, and a
statement before the magenta line.
Still, we do not know dfrom the plot which line originated from which color. Therefore, we
add a LEGEND statement to the GLOBAL section that reserves
space for the legend,
and will then use the LEGEND statement again in each LOCAL section to indicate the legend
for the curve in question:
(Similarly, proceed for example5a.dat and example5b.dat).
NOTE
LEGEND statements must be directly after the DIMENSION in the GLOBAL section, and directly before
the GOLINE in the LOCAL section.
LEGEND statements are oprional (ii.e. may be onitted).
The TITLE statement is always centered regardless how
many legends are displayed. However, in titles, blanks are used in the calculation. If we, therefore,
write
If many points are used, renditions become useless as the lines are too short to see the dot
schemata, then, even dashed lines get displayed as solid lines.
example5.str
Reference:example5.gif
Reference:example5.str
Reference:example5a.dat
Reference:example5b.dat
[next page] , or [overview] , or [table of contents]
Example data 5a of PLOTTER tutorial |Example data 5b of PLOTTER tutorial
<Xaxis ><Y1 >< Y2 > |<Xaxis ><Y1 >< Y2 >
Monday 3 22.5 |Monday 8 10.3
Tuesday 3 9.4 |Tuesday 3 13.5
Wednesday 7 30.2 |Wednesday 6 57.6
Thursday 11 48.7 |Thursday 7 64.3
Friday 4 16.2 |Friday 11 20.4
Saturday 4 9.4 |Saturday 2 15.1
Sunday 5 2.3 |Sunday 5 9.4
In this example we will work with the <Y1> values only.
Subsection 1.5.2 Initial steering file
%PLOTTER Label for steering file
GLOBAL Global section here
DIMENSION 200 400 Dimension 200 by 400 pixel
TITLE Multiple input data Title tag
XLEGEND Day of the week Some X label
YLEGEND Number/duration of uses Some Y label
LOCAL FIRST local statement
INFILE example4.dat select example4.dat as input
XVALUE 1 4 parse X (Note - 3 letters only!)
YVALUE 12 15 parse Y
XAXIS VALUES 8 1 X axis has 8 values; interval of 1
YAXIS 0 12 2 Y axis from 0 to 12, interval 2
COLOR RED paint the curve red
GOLINE 2 plot a line
LOCAL SECOND local statement
INFILE example5a.dat select example5a.dat as input
XVALUE 1 4 |
YVALUE 12 15 |
XAXIS VALUES 8 1 | same values as in first local
YAXIS 0 12 2 |
COLOR BLUE paint the curve blue
GOLINE 2 plot a line
END END
Subsection 1.5.3 More file input
Subsection 1.5.4 Legends for the curves
Subsection 1.5.5 Considerations
TITLE Multiple input data
we will have a title that starts with several blanks and therefore is shifted to the right
in the plot. This is useful if the title lettering conflicts with the Y axis.
Subsection 1.5.6 Result steering file
%PLOTTER A comment here
GLOBAL Global section here
DIMENSION 200 400 Dimension 200 by 400 pixel
LEGEND 3
TITLE Multiple input data
XLEGEND Day of the week
YLEGEND Number/duration of uses
LOCAL FIRST local statement
INFILE example4.dat select example4.dat as input
XVALUE 1 4 parse X (Note - 3 letters only!)
YVALUE 12 15 parse Y
XAXIS VALUES 8 1 X axis has 8 values; interval of 1
YAXIS 0 12 2 Y axis from 0 to 12, interval 2
COLOR RED paint the curve red
LEGEND example4.dat
GOLINE 2 plot a line
LOCAL SECOND local statement
INFILE example5a.dat select example5a.dat as input
XVALUE 1 4 |
YVALUE 12 15 |
XAXIS VALUES 8 1 | same values as in first local
YAXIS 0 12 2 |
RENDITION DASHED ---- ---- ----
COLOR BLUE paint the curve blue
LEGEND example5a.dat
GOLINE 2 plot a line
LOCAL
INFILE example5b.dat select example5b.dat as input
XVALUE 1 4 |
YVALUE 12 15 |
XAXIS VALUES 8 1 | same values as in first local
YAXIS 0 12 2 |
RENDITION DOTTED ........
COLOR MAGENTA paint the curve blue
LEGEND example5b.dat
GOLINE 2 plot a line
END END