Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: pgplotter.ploty2 - Function Up: pgplotter - Tool Previous: pgplotter.ploty - Function


pgplotter.plotxy1 - Function



Package display
Module plotter
Tool pgplotter


Plot X and Y vectors with auto-scaling


Synopsis
plotxy1(x, y, xlab, ylab, tlab, plotlines, ptsymbol)


Arguments

x   An X vector
    Allowed: float
y   A collection of Y vectors
    Allowed: float
xlab   A label for the X axis
    Allowed: string
ylab   A label for the Y axis
    Allowed: string
tlab   A label for the plot title
    Allowed: string
plotlines   Toggle for plotting lines or points
    Allowed: Boolean
    Default: T (lines)
ptsymbol   Symbol ID
    Allowed: integer
    Default: 2


Returns
boolean


Description
This gplot1d-emulator plots a collection of Y vectors with auto-scaling against a single X vector. If there is more than one Y vector, they should be arranged in a 2-D array with the first dimension being the number of vectors to plot and the second dimension being the length of each vector. The length of the X axis vector must be the same as the length of each Y vector. The color of each Y vector on the plot will be different for the first 16 plots, after that the colors will cycle through the same 16 colors. The ylabflag determimes whether the y axis label is printed on the plot itself, in addition to the y axis. For a single plot, this may sensibly be set to false. However, if plotxy1 is called repeatedly without clearing the plot, the successive calls will overplot the new data on the original, and having this flag set to true is useful for determining which color plot corresponds to which data. This function is called plotxy1 to distinguish it from the standard pgplotter function, plotxy, which has some subtle differences.



Example
include 'pgplotter.g'
pg := pgplotter();
x := 1:100;
y1a := sin(x/10);
y1b := cos(x/10);
y2 := sqrt(x);
pg.plotxy1(x,y1a,'X Index','Sine Function','Title');
pg.plotxy1(x,y1b,,'Cosine Function');
pg.plotxy2(x,y2,,'SQRT Function');
pg.ptxt(105,5.5,270,0.5,'SQRT (X)');





next up previous contents index
Next: pgplotter.ploty2 - Function Up: pgplotter - Tool Previous: pgplotter.ploty - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15