LSPLOT is a general single/multiple data line routine for plotting lines or scatterplots. Optionally, error bars and symbols can be added. LSPLOT differs in philosophy from most other LONGLIB MASTER routines in that plotting options are passed via an option array routine. The routine is designed to produce a reasonable plot with the option array set to all zeros. The output format is changed by initializing selected array elements to the values described below. This permits simple but flexible specification of the plot format.
CALL LSPLOT(x,y,ndp,ndl,iflag,f,c,nc) x (R): x input array dimensioned x(ndp,ndl). Depending on option selected, x need only be dimensioned x(ndp) -- this is the default option. y (R): y input array dimensioned y(ndp,ndl). If ndl=1 then y may dimensioned y(ndp) ndp (I): number of data points/line dimension ndl (I): number of data lines dimension iflag (I): LONGLIB option flag (one's digit arbitrary) < 0 : do not close LONGLIB after plotting = 0 : close LONGLIB--no plot produced > 0 : close LONGLIB after plotting (magnitude) >10000 : do not initialize LONGLIB before plotting (100's digit) = 0 : Ask which screen device to use <> 0 : Screen Device Number (see FRAME) f (R): option array dimensioned at least f(53) (described below) c (C): array of strings dimensioned C(3+ndl) c(1) : x axis title c(2) : y axis title c(3) : top title c(4) : line 1 legend (optionally used) c(5) : line 2 legend (optionally used) ... ... nc (I): array of string lengths dimensioned nc(3+ndl) nc(1) : number of characters to use in C(1) nc(2) : number of characters to use in C(2) ... ...
The array elements of the option array f are interpretted according to the following table. Some parameters have default values (shown in square brackets). These are used when the input value is zero. A simple plot may be produced by setting all the elements of f to zero. Note that user specified input scaling factors should be powers of ten when the log axis specification is selected. An optional legend may be plotted. The legend consists of a column of line/simple examples (if selected) and input text.
array range of index values action for each value ------- -------- ------------------------ 1 0<=.<=ndp number of points/line to plot [ndp]: 0=ndp used 2 0<=.<=ndl number of lines to plot [nl]: 0=ndl used 3 -1/0/1 x scale: 0=auto,smoothed; 1=auto,nosmooth; -1=user 4 xmin user supplied scale value (used if f(3)<0) 5 xmax user supplied scale value (used if f(3)<0) 6 -1/0/1 y scale: 0=auto,smoothed; 1=auto,nosmooth; -1=user 7 ymin user supplied scale value (used if f(6)<0) 8 ymax user supplied scale value (used if f(6)<0) 9 0/1 x value usage: 0=first line of x data array used for all y lines; 1=lines of x,y paired 10 0/1 connect plotted points: 0=yes; 1=no 11 >=0 symbol plotted every ()th point: 0=no symbols 12 >=0 line symbol size [0.1]: 0=use default 13 >=0 symbol number for first data line, each line then uses next symbol in sequence 14 8<.<8 error bar option (see below): 0=no error bars 16 >=0 error bar size [0.1]: 0=default used 17 0/1 vertical line from points to reference value: 0=no; 1=yes 18 rval reference value 19 -1/0/1 x axis type: 0=linear; 1=log axis, -1=no axis 20 -1/0/1 y axis type: 0=linear; 1=log axis, -1=no axis 21 >=0 x axis length [7.0]: 0=default used 22 >=0 y axis length [5.0]: 0=default used 23 >=0 x axis tick pattern (see axis3) [7.00]: 0=default 24 >=0 y axis tick pattern (see axis3) [5.00]: 0=default 25 0/1 x axis title side of axis: 0=below; 1=above 26 0/1 y axis title side of axis: 0=left; 1=right 27 0/1 x axis auto exponent enable: 0=enable; 1=disable 28 0/1 y axis auto exponent enable: 0=enable; 1=disable 29 0/1 x axis tick side: 0=below; 1=above 30 0/1 y axis tick side: 0=left; 1=right 31 0/1 x axis number orientation: 0=horizontal; 1=vertical 32 0/1 y axis number orientation: 0=vertical; 1=horizontal 33 0/1 x axis numbers/title: 0=shown; 1=not shown 34 0/1 y axis numbers/title: 0=shown; 1=not shown 35 0/1 use x=log10(abs(x values)+1.e-34): 0=no; 1=yes 36 0/1 use y=log10(abs(y values)+1.e-34): 0=no; 1=yes 37 -1/0/1 add mirror x axis: 0=no; 1=w/labels; -1:w/o labels 38 -1/0/1 add mirror y axis: 0=no; 1=w/labels; -1:w/o labels (mirrored axes placed on opposite from normal axis) 39 >=0 x axis label size [0.15]: 0=use default 40 >=0 y axis label size [0.15]: 0=use default 41 >=0 top title character size [0.18]: 0=use default 42 0/1/2/3 grid: 0=no grid; 1=solid; 2=dotted; 3=ticked 43 -1/0/1 legend: 0=no legend; 1=right side; -1=user locate 44 xval user specified lower-left corner of legend 45 yval user specified lower-left corner of legend 46 0/1 show plot symbol on legend: 0=no; 1=yes 47 0/1 show line segment on legend: 0=no; 1=yes 48 >=0 legend character height [0.12]: 0=use default 49 >=0 legend line segment length [0.5]: 0=use default 50 -1/0/1 top title justify: 0=center; -1:left; 1:right 51 0/1 plot horizontal reference line: 0=no; 1=yes 52 0/1 use linetype array values: 0=no; 1=yes 53 0/1 use color array values: 0=no; 1=yes 54 >=0 color index #1: 0=color value 1 used 55 >=0 linetype index #1 56 >=0 color index #2: 0=color value 1 used 57 >=0 linetype index #2 ... ... ... etc ...
The optional error bar specification, when non-zero, changes interpretation of lines. The first line (and every third line) conidered a "center" line. The second line specifies the relative error (to be added to the first line) used for plotting the tops of the error bars. The third line is used similarily to locate the bottoms of the error bars. When the error bar specification is negative the center line points are marked with a special "x" (in addition to any other option). The absolution value of the specifiation determines the type of error bar according to the following table.
value type of error bar ------ --------------------------------------------------- 1 line connecting relative errors 2 1 + horizontal bars at relative errs 3 1 + vertical bars at relative errs 4 double line connecting rel. errs+horizontal bars 5 double line connecting rel. errs+vertical bars 6 vertical rectangle w/top and bottom rel. errs 7 rectangle with corners at relative errors
The color and line type index (when enabled) are used according to the following table.
index # color usage linetype usage --------- ------------- ---------------- 1 x axis x axis 2 x axis numbers y axis 3 x axis title title 4 x axis exponent legend titles 5 y axis reference line 6 y axis numbers error bars 7 y axis title line #1 linetype 8 y axis exponent line #2 linetype 9 title etc. 10 legend titles ... 11 reference line ... 12 grid ... 13 line #1 color ... 14 line #2 color ... ... ... etc. ... ...