PLOTTER

Documentation in postscript

 
	

location: Home > Archive > PLOTTER (1999)


Chapter 1: PLOTTER tutorial

Copyrighted material. See the Internet BioCompanion Home Page for further information.



Section 1.1: EXAMPLE 1 - minimalistic approach

[ Previous chapter ][ This chapter ][ Next chapter ] Using a *.plt file to plot example1.dat. Minimalistic approach.


Subsection 1.1.1

Starting material

We will create a new file to plot the data from example1.dat :

 
Example data 1 of PLOTTER tutorial   
<Xaxis><Y1 >< Y2 ><  Y3>  
2        4     7    3.1  
3       -2     2   -0.4  
4        6     2    1.5  
9       -1     4    3.5  
15       4     3    9.8  
24       4     3    8.1  
29       3     5    5.6  
34       6*    5    7.2  
46       6*    5    7.2  
The example1.plt file will be selected if we give the command

plotter example1.dat

as the example1 filestem is used to find example1.plt.


Subsection 1.1.2

Creation of the steering file

We just need a header ( %PLOTTER ), a GLOBAL statement with the dimensions of the GIF file and a LOCAL section. Finishing with GOLINE we parse the file ( example1.dat ) and END the description.

The 'example1.dat' file looks as follows:

 
Pos.     1         2         3  
123456789012345678901234567890  
Example data 1 of PLOTTER tutorial   
<Xaxis><Y1 >< Y2 ><  Y3>  
2        4     7    3.1  
3       -2     2   -0.4  
4        6     2    1.5  
9       -1     4    3.5  
15       4     3    9.8  
24       4     3    8.1  
29       3     5    5.6  
34       6*    5    7.2  
46       6*    5    7.2  
We conclude that 'X' is from the horizontal position 1 to 4, Y(1) from 9 to 11, Y(2) from 15 to 17, and Y(3) from 20 to 24. Keywords in the LOCAL section, therefore, are

XVALUE 1 4

and

YVALUE 9 11

As our data file has two headers, we use a

GOLINE 2

statement (go as a line graphic with the 3rd line of first data).

The steering file should now look as follows:

 
%PLOTTER  
GLOBAL  
DIMENSION 100 200   
LOCAL  
XVALUE 1 4  
YVALUE 9 11  
GOLINE 2  
END  
Running this through PLOTTER will produce an empty image of the dimensions 200x400 as we have no data points actually plotted - we just have indicated where to find them in the file.


Subsection 1.1.3

Next steps: Parse the data

We will want to plot all Y values later, but we use only X and Y(1) for the first example. We find a * in column 12 that marks the last two X values as 'invalid'. Therefore, we find as an initial approximation that X varies from 0 to 50, and Y from 0 to 10. Incrementing each with 0.5 gives the two statements

XAXIS 0 50 1

YAXIS 0 10 1

Look at the example - example1.gif shows your first successful plot with PLOTTER, and example1.plt is the steering file for example1.dat :

 
%PLOTTER  
GLOBAL  
DIMENSION 200 400   
LOCAL  
XVALUE 1 4  
YVALUE 9 11  
XAXIS 0 50 1  
YAXIS 0 10 1   
GOLINE 2  
END  


Subsection 1.1.4

Result

Congratulations!

Reference:example1.gif

Reference:example1.dat

Reference:example1.plt


[ Previous chapter ],[ This chapter ][ Next chapter ] [next page/section] , or [overview] , or [table of contents]

Copyrighted material. See the Internet BioCompanion Home Page for further information.