Display()

Display a graphical plot of spectra in a workspace.

DISPLAY [wksp=Workspace] [xmin=Real] [xmax=Real] [ymin=Real] [ymax=Real] [linecolour=Colour] [linewidth=Real] [textcolour=Colour] [textheight=Real] Display the workspace within the given range.
[/HISTOGRAM]   Display as a histogram
[/LINE]   Display as a line plot
[/MARKERS]   Display as markers
[/ERRORS]   Display as error bars

example:

	# Display a spectrum but change the title first
	>> wm = s(10)
	>> wm.title = "This is my Nobel plot!"
	>> Display wm xmin=1.0e4 xmax=7.0e4

Note: Other display parameters may be altered using the Alter() and Toggle() commands.

Display

The display command is the high level command used to plot one or more spectra from a workspace in a single operation. By default, the Display() command will assume that the plot is to be done as a histogram. The plot will be automatically scaled and titled with other relevant information from the workspace. Most features of the Display() command may be customized either by using the command line parameters on Display() itself or by modifying characteristics of the plot using the Alter(), Toggle() or Limits() commands.

Parameters:

/Histogram

This is the default for the Display() command when given bin-mode (histogrammed) data. It will plot a spectrum making the assumption that it is a valid histogram (i.e. binned data with one more X value than Y value). The data values are represented by the height of the corresponding bin. Remember that several commands can actually affect the height of bins unexpectedly by changing the binning method and/or data. Examples of these are Alter/Binning and Units/Channel.

If point-mode data is supplied with the /Histogram qualifier an error will be reported as it is not possible for Open GENIE to guess the assumptions you may want to make about the conversion (an extra X value would have to be generated by interpolation).

/Line

This is the default for the Display() command when given point-mode data. It will plot a spectrum as if it is a numerically calculated function (i.e. with the same number of X-values as Y-values) and join the points with a straight lines. If histogram data is displayed with the /Line qualifier, the data will undergo a transformation to take the bin centre positions as the X-values for the data points (see the Centre_bins() function). There are situations where you may not wish this behaviour to be the default (e.g. for logarithmic binning). Generally, it is safer to transform the data yourself into point-mode and then use Display to plot it.

/Markers

This is identical to the /Line qualifier in operation except that instead of joining the data points with lines, marker symbols are used instead. See Marker Types for a list of available styles.

/Errors

This is identical to the /Line qualifier in operation except that instead of joining the data points with lines, error bars are generated. These are centered on the data points and have a size scaled from the values of the data error values contained within the workspace E array.

Wksp (Workspace)

This gives the workspace to be plotted. As long as the workspace is a valid Open GENIE workspace containing one or more spectra this command will produce a display. In later version of Open GENIE this will also take multi-spectra workspaces to produce multiplots (see Multiplot()).

For convenience, if the Display() command is used without a workspace being specified, the last workspace to be plotted will be used.

Xmin, Xmax, Ymin, Ymax (Real)

These parameters can be used to set fixed limits for the display, for more details see the Limits() command.

Linecolour (Colour)

This parameter changes the colour for drawing the axes and surrounding boxes, see Alter() for details.

Linewidth (Real)

This parameter changes the line width used for drawing line plots, see Alter() for details.

Textcolour (Colourl)

This parameter changes the colour used for drawing text, see Alter() for details.

Textheight (Real)

This parameter changes the text height used for drawing text, see Alter() for details.