%pl options
The following options are available for use with %pl in automatic mode:
Option

Description

SCALE=LINEAR

Specifies a Cartesian plot with linear x and y data. This is the default.

SCALE=LOG_LINEAR

Specifies a Cartesian plot with linear x and log y data.

SCALE=LINEAR_LOG

Specifies a Cartesian plot with log x and linear y data.

SCALE=LOG_LOG

Specifies a Cartesian plot with log x and log y data.

N_GRAPHS=<n>

Specifies the number of graphs to be drawn on the same axes (the default is
N_GRAPHS=1)

X_AXIS=<text>

Specifies text for xaxis label (the default is X_AXIS=X)

Y_AXIS=<text>

Specifies text for yaxis label (the default is Y_AXIS=Y)

TITLE=<text>

Specifies the title for graph (by default there is no title).

X_ARRAY

Specifies that an array of x values is supplied. If this option is not specified
then the first x value together with a constant increment must be supplied.

Y_MIN=<value>

Specifies the minimum y value. By default this is computed from the data.

Y_MAX=<value>

Specifies the maximum Y value. By default this is computed from the data.

COLOUR=<name>

Specifies the colour of the plot (red, black, blue, etc.). The first use of
COLOUR refers to the first plot, the second to the second plot and so on.

COLOR=<name>

The same as COLOUR.

STYLE=<n>

STYLE=0 gives a smooth plot. With STYLE=1, points are plotted using small
squares and the relevant colour. The first use of STYLE refers to the first
plot, the second to the second plot and so on.

Additional options for use with native %pl are described here.
Note that where text is supplied for the label of an axis or for the title, this
text is terminated by the next comma, space or square bracket. In order to
include commas, spaces or square brackets in the text you should enclose it in
single or double quotation marks.
Here is a program that uses some of these options.
cSimple2.for
WINAPP
INTEGER i,x,winio@,N
PARAMETER(N=1000)
REAL*8 p1,p2,p3,y(N)
cPrepare the data.
p1=1.5
p2=150.0
p3=15
x=0
DO i=1,N
y(i)=p1*sin(x/p3)*exp(x/p2)
x=x+1
ENDDO
cDisplay a window containing the graph.
i=winio@('%ww[no_border]%ca[SIMPLEPLOTDamped wave]%pv&')
i=winio@('%pl[x_axis=Time(Miliseconds),'
+//'y_axis=Amplitude,title="Sample plot",colour=red]',
+ 400,300,N,0.0D0,1.0D0,y)
END
In this case, since the option X_ARRAY is not used, the argument list for %pl
includes the initial value of x (0.0D0) and the increment for x (1.0D0). Note
also that %ww and %pv are used with %pl. As a result, the window can be sized
and the graph is redrawn to fill the window. The output is illustrated below.
Here is a fragment of code that shows how to plot two graphs on one set of axes.
i=winio@('%pl[X_AXIS=Time(Miliseconds),Y_AXIS=Amplitude,'//
+ 'TITLE="Sample",N_GRAPHS=2,COLOUR=red,COLOUR=blue,X_ARRAY]',
+ 300,300,N,xarr,yarr1,yarr2)
There is one xarray for the two yarrays. The first graph would be red in
colour and the second blue.
Note that the arrays of data supplied to %pl usually need to be available for as
long as the window is displayed. In particular, the data will be replotted if
the window is resized. It is also possible to call the routine
simpleplot_redraw@ to force all such plots to be redrawn using whatever values
are currently present in the arrays. simpleplot_redraw@ is a subroutine that
takes no arguments.