next up previous contents
Next: hardcopy Up: Plot Commands Previous: Plot Commands

cpd: set current plotting device


Syntax:           cpd < plot device>

                        cpd <filename>

           cpd <filename>/{ps,cps,vps,vcps}

                        cpd none


Set current plot device. The same can be achieved with the setplot device  command, which takes the same options. In XSPEC12 as in previous versions, the plot device options are those allowed by the PGPLOT library.

When plotting to the screen, the most commonly used devices are /xs (/xserve) and /xw (/xwindow).  If you select /xs, the plot window is persistent: it remains visible and in the selected position even after the XSPEC session is finished.  With /xw the plot window closes at the end of the XSPEC session.  Also note that on some platforms, when using /xs in multiple desktops, you might not see the window appear in a second desktop if  it is still open in the first.

If the second argument does not start with a ‘/’ character, which indicates that the string represents a PGPLOT device, it is taken to be a filename for Postscript output, and the default postscript driver will be used. The default postscript driver produces a monochrome plot in landscape orientation.

The filename argument can be followed by a ‘/’ that specifies a particular postscript driver variant. Allowable  variants are: cps (color postscript), vps (monochrome portrait orientation), and vcps (color portrait orientation), as well as the default, ps.



PGPLOT devices

A number of plot device types are supported in XSPEC. PGPLOT devices available on Unix machines are :



Graphics Interchange Format file, landscape orientation


Graphics Interchange Format file, portrait orientation


Null device, no output


Portable Pixel Map file, landscape orientation


Portable Pixel Map file, portrait orientation


PostScript file, landscape orientation


PostScript file, portrait orientation


Colour PostScript file, landscape orientation


Colour PostScript file, portrait orientation


Tektronix 4010 terminal


GraphOn Tek terminal emulator


Retrographics VT640 Tek emulator


Color gterm terminal emulator


XTERM Tek terminal emulator


ZSTEM Tek terminal emulator


Visual 603 terminal


Kermit 3 IBM-PC terminal emulator


Tektronix 4100 terminals


VT125 and other REGIS terminals


pgdisp or figdisp server


X window window@node:display.screen/xw


An /XWINDOW window that persists for re-use


Closes the device. For Postscript output, it flushes the write buffer into the file and closes the file.

Note that in XSPEC12, each plot command produces a separate page in the postscript file, unlike previously where each plot overwrote the previous plot.



// produce a set of color postscript plots in landscape orientation

// … commands to produce a plot.

XSPEC12> cpd

XSPEC12> plot data chi

XSPEC12> plot ufspec

XSPEC12> plot efficiency

XSPEC12> cpd none


Will produce 3 plots in the file


Note, in contrast, that the hardcopy command will print only the plot that is currently in a graphics frame.


next up previous contents
Next: hardcopy Up: Plot Commands Previous: Plot Commands