plot

make plots of the last scan

SYNOPSIS

plot [data_group] [x_element] [y_element]

DESCRIPTION

The plot macro is called at the end of each scan in order to plot the data. You should use the setplot macro to select whether a screen plot, a simple printer plot or both are produced by plot.

DEFINITION

If both end-of-scan screen plots and lp plots are selected, plot is defined something like:

def plot '
   if (BG) {do_bg} # calculate linear background
   splot \$*       # draw screen plot
   onp; offt       # turn on printer, off tty
   lp_plot \$*     # draw lp plot
   plot_res \$*    # print scan results
   ont; offp       # turn on tty, off printer
'

If neither or just one type of plot is selected, the plot macro is redefined accordingly. If no plots are selected, the scan results are still printed on the screen and printer.

GLOBALS

BG
global variable holding a flag that if set, indicates to use the background-subtracted data in the analysis results and plots produced by the plot macro. It is important to make sure the do_bg macro is called to calculate the background-subtracted data before using macros such as pl_FWHM that look at the value of BG to determine which data group to analyze. The various standard definitions for the plot macro will call do_bg when appropriate.

MACROS

do_bg
calculates a linear background based on the scan endpoints, subtracts the background from the scan (in data group 0) and places the results in data group 1.
plot_res
prints results of simple scan analysis including peak value, full-width at half max, integrated intensity, etc.

SEE ALSO

data setplot splot lp_plot