Produced by IDL 7.1.1
User Documentation

./plotter
oplotfn.pro

Last modification date:
Wed Sep 28 13:27:10 2016

oplotfn

procedure oplotfn, fnname, params, [color=long integer], [index=variable], [idstring=string], [/noshow]

Overplots a function using oplot on to the GBTIDL plotter's surface. It also remembers the function and parameters so that they can be replotted as needed to the desired screen resolution (e.g. the x-axis changes). Overplots, if toggled off, are automatically toggled on by a call to oplotfn. Overplots include both function calls (set using this function) and simple x,y overplots set using gbtoplot.

The syntax of the function call using the fnname parameter is:

     arr = fnname(params, minchan, maxchan, chanperpix,count=count)
 
where params are exactly as supplied to oplotfn, minchan and maxchan are the current x-axis limits, in channels, and chanperpix is the current number of channels per pixel (that is a double-precision value). Count should be set by fnname to be the total number of points to be plotted. Use that to signal that no points should be plotted for this call (e.g. the x channel range is out of the significant range of the function). The returned value is a 2-D array where arr[0,*] is the set of x-axis values, in channels, and arr[1,*] is the set of y-axis value corresponding to those x-axis values. Typically, the x-axis values would be generated using seq as:
     x = seq(minchan, maxchan, chanPerPix)
 
and then y is generated from x using params and the array of [x,y] is then returned. The returned value (arr) is not examined if count is 0.

Examples
See the source code for gauss_plot_fn for an example function suitable for use by oplotfn.
Version
$Id$
Common blocks
gbtplot_common

Parameters
fnname
in, required
string
The name of the function to be invoked to generate the values to be plotted (see above).
params
in, required
any
. The parameters passed to fnname.

Keywords
color
in, optional
long integer (def. !g.oplotcolor)
The color of the line to be plotted.
index
out, optional
variable
Returns the index associated with this oplot. This index can be used to clear this over plot using clearoplots. Note that once an index is cleared, subsequent indexes are renumbered - i.e. there are never any gaps in in index number.
idstring
in, optional
string (def. ".")
A string that can be used to identify this oplot and thereby group oplots together. This is most useful with clearoplots to remove just those oplots with the same idstring. Withing GBTIDL, all internal id strings begin with two underscores so that they are less likely to conflict with user-defined idstrings. The default is ''.
noshow
in, optional
boolean (def. unset)
When this is set, the function is not immediately displayed. This is useful when you have several graphical commands to issue and you don't want the plotter to have to replot everything each time. Instead, remember to do a reshow at the end to show everything that has been added. The default behavior is to show the plots immediately.


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:37 2016