spec

Software for Diffraction

3.7. - Plotting Macros



At present, spec's plotting is done entirely at the macro level and does only character plots on the screen and printer. Several screen plotting macros are defined for various types of terminals.
setplot [mode]          # Select plotting options
plot                    # Plot data on printer
rplot                   # Plot updated data at each point of scan
splot                   # Plot data on screen
pts                     # List current data on the screen
lp_plot                 # Primitive 132-column wide plot for printers

plot_res                # Show results after scans
splot_res               # Show results on screen plot
rplot_res               # Show results on updated plot during scans


The setplot macro defines the plot macro, depending on your choices of plot modes.

The scan_plot macro is invoked within the looping portion of all the scans.


The setplot macro assigns values to the global variable, PLOT_MODE, according to the values defined in the following table:
 Bit Value   Description 

 1   Do updated plotting during scans. 
 2   Do screen plot after scan. 
 4   Do printer plot after scan. 
 8   Scale x-axis of screen plots to fit width of scan. 
 16   Force y-axis minimum to be zero. 
 32   Use logarithmic y-axis. 
 64   Do simple background subtraction 
 128   Use high-resolution plotting device 
 256   With high-res, don't use large dots 
 512   With high-res, don't connect points with lines 
 1024   With high-res, don't draw error bars 



The scan_plot macro is called for each point of a scan, while plot is called at the end of each scan.

The splot macro draws a screen plot. The rplot macro is called to redraw the plot with minimal updating during data accumulation.