Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | display | |
Module | plotter | |
Tool | pgplotwidget |
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).
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)
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 |