next up previous contents
Next: Appendix E Associated programs Up: Appendices Previous: Appendix C Adding models to XSPEC

Overview of PLT

As in previous versions, the initial release of XSPEC12 uses the PLT library, which is in turn based on PGPLOT[1], to implement its plotting capabilities.

Future versions will be able to offer other plotting library options.

Extensive documentation for the PLT graphics routine is available in the The QDP/PLT Users's Guide and from PLT’s interactive help.  This appendix is intended to provide information to assist in using PLT from within the XSPEC program.

Within XSPEC, it is possible to set your graphics device using the CPD command.  Any PGPLOT device supported by your local version of PGPLOT is accepted. The CPD command can also be used to display a list of all PGPLOT devices. If you fail to enter a device name, you will be prompted for a PGPLOT device every time you generate a new plot.

From XSPEC, there are two ways to call the PLT routine. Both have the same syntax which is described in the corresponding manual section.

·        The plot <plot mode> command will produce a graph and control will return immediately to XSPEC.

·        The iplot <plot mode> command will put XSPEC into interactive plot mode. The PLT> prompt will appear after the XSPEC plot command has finished producing the same graph. At this point, you can enter PLT commands to inspect interesting parts of the graph, add labels, or make a hardcopy file for later printing.

Getting started with PLT

In the following description of PLT commands, the full command is descried. Capital letters denote the shortest abbreviation of the command that will be recognized. Here is a brief guide to some of the PLT commands that can be entered when iplot is invoked.


HElp will provide you with descriptions of the PLT commands.


Plot redraws the display using all of the commands that change the graph entered since the last plot.


Rescale  [<X,Y>]

followed by two numbers, will set the minimum and maximum of the plotted x-range to the numbers specified. Without further arguments, Rescale X or Y will reset  the minimum and maximum values to their default values. Rescale also updates the screen immediately. Other commands allow you to make several changes to the the graph without having to wait for the screen to be updated after every change.


LAbel  <Top,X,Y> [<string>]

add labels to various locations on the graph. For example, typing

LA Top EXOSAT was great

Will cause the message “EXOSAT was great” to appear at the top of the graph the next time the display is redrawn. Without the string argument the current label for Top, X, or Y is set to the empty string.


Hardcopy  [?, PGPLOT plot device]

Create a file that can later be printed. Since it redraws the graph and sends it to a file, it does not reproduce what currently is visible on the graphics display, but rather what you would see if you re-issued the Plot command. With the optional “?” argument, Hardcopy returns the current hardcopy plotting device. This can be overridden with Hardcopy [PGPLOT device name].


EXit  return control to XSPEC. Any changes you have made to the plot will be lost.


PLT Command summary


Immediately clear the graphics device


Change the default colour index


Produce a contour plot


Change the plotting device


Clear the graphics device and return control to XSPEC


Change the default character size


Control whether errors are displayed and used in fitting


Exit PLT and return control to XSPEC


Fit the PLT model to the data


Evaluate the model at the specified location


Change the default text font


Freeze a parameter value


Change the default gap size between the data and the edge


Control the location of the major and minor tic marks


Make a file that can later be printed


Obtain help on any PLT command


Numerically integrate the model over specified range


Add or remove labels from the plot


Control whether a line is used to connect data points


Control whether data is plotted using a log10 scale


Change the default style of the line connecting the data points


Change the default line width


Control whether the data points are plotted with markers


Define a PLT model


Change a parameter value associated with the model


Immediately re-plot the data


Change the PLT> prompt


Reset the minimum and maximum plot range


Change the color representation of the specified color index


Display the values of PLT internal variables


Control how PLT divides data into vectors


Compute various statistical properties of the data


Allow a parameter value to vary during a fit


Control whether the time stamp is plotted


Compute the uncertainty in a parameter value


Display date of the most recent modification to PLT


Control the size of the viewport plotting area


Write a QDP data file to disk


Write both QDP data and header files to disk


Write a QDP header file to disk


Write a model file to disk


Define the method used to calculate the x-variable


Define the y-axis scale for a contour plot


Execute operating system commands


Read commands from a PLT command (.PCO) file


[1] PGPLOT is the name of a Graphics Subroutine Library written by T. J. Pearson

at the California Institute of Technology


next up previous contents
Next: Appendix E Associated programs Up: Appendices Previous: Appendix C Adding models to XSPEC