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


next up previous contents index
Next: pgplotmanager.maskline - Function Up: pgplotmanager - Tool Previous: pgplotmanager.done - Function


pgplotmanager.plotxy - Function



Package display
Module plotter
Tool pgplotmanager


Plot X,Y vectors as lines or points with auto-scaling


Synopsis
plotxy(x, y, plotlines, newplot, xtitle, ytitle, title, linecolor, ptsymbol, mask)


Description
plotxy is defined to allow you to make line or scatter plots. The routine will scale and draw the axes appropriately, or you can specify to plot over a previous plot using the existing scaling. Axis labels and a plot title can be specified. You can also specify a mask, if desired, to blank out bad data points from the plot. When a mask is given, the unmasked data are plotted in line segments.



Example
Note that the examples below can be applied to pgplotwidget and pgplotter tools with greater ease since both support all of pgplotmanager's functions.
include 'pgplotmanager.g'
f := frame();
pg := pgplotmanager(pgplot(f));
x := 1:100;
y := x*x;
pg.plotxy(x,y,xtitle='XX', ytitle='YY', title='TITLE');
pg.plotxy(x+10, y, F, F);



Example
include 'pgplotmanager.g'
f := frame();
pg := pgplotmanager(pgplot(f));
x := 1:100;
y := sqrt(x);
pgmask := array(T,100)
pgmask[20:30] := F
pgmask[50:55] := F
pg.plotxy(x,y,mask=pgmask);



Arguments

x   X values
    Allowed: non-complex numeric array
y   y values
    Allowed: non-complex numeric array
plotlines   Plot lines (T) or points (F)
    Allowed: boolean
    Default: T
newplot   Start a new plot (T) or overplot (F)
    Allowed: boolean
    Default: T
xtitle   x axis title (ignored if newplot is F)
    Allowed: string
    Default: none
ytitle   y axis title (ignored if newplot is F)
    Allowed: string
    Default: none
title   plot title (ignored if newplot is F)
    Allowed: string
    Default: none
linecolor   color index for lines or points
    Allowed: integer
    Default: 2
ptsymbol   symbol index (used if plotlines=F)
    Allowed: integer
    Default: 2
mask   mask for eliminating bad data points (T for good data, F for masked data)
    Allowed: boolean array
    Default: none


Returns
T or fail (illegal argument)




next up previous contents index
Next: pgplotmanager.maskline - Function Up: pgplotmanager - Tool Previous: pgplotmanager.done - 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