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


next up previous contents index
Next: pgplotwidget.displaylist - Function Up: pgplotwidget - Tool Previous: pgplotwidget.plotxy - Function


pgplotwidget.maskline - Function



Package display
Module plotter
Tool pgplotwidget


Draw line segments based on input vectors and a mask


Synopsis
maskline(x, y, mask, decimate)



Description

maskline is analogous to line except that it takes a mask (an array of boolean elements) and draws a series of line segments with the masked data eliminated.

The argument decimate is used to speed up the search for masked pixels. It breaks the spectrum into decimate segments. It uses built in Glish functions to detect whether there are any masked pixels in each segment. If there are, then those masked pixels are found, one by one with the Glish indexing operator (slow). If you set decimate==1 then each pixel of the spectrum is searched for masked pixels with the Glish indexing operator (very slow). The default decimation of 10 is safe for any length spectrum (i.e. it will realize if there aren't enough pixels for 10 segments).



Example
include 'pgplotter.g'
pg := pgplotter();
x := 1:100;
y := sqrt(x);
pgmask := array(T,100)
pgmask[20:30] := F
pgmask[50:55] := F
pg.env(0,100,0,10,0,0)
pg.maskline(x,y,pgmask)



Arguments

x   X values
    Allowed: non-complex numeric array
y   y values
    Allowed: non-complex numeric array
mask   mask for eliminating bad data points (T for good data, F for masked data)
    Allowed: boolean array
    Default: No mask
decimate   Number of segments to decimate into
    Allowed: Integer
    Default: 10



Returns
T or fail




next up previous contents index
Next: pgplotwidget.displaylist - Function Up: pgplotwidget - Tool Previous: pgplotwidget.plotxy - 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