next up previous contents
Next: Setting Commands Up: Plot Commands Previous: plot

setplot: modify plotting parameters

Set one of the various plot options.

 

setplot <subcommand string>

 

where <subcommand string> is a keyword followed in some cases by arguments.  Current settings of all setplot items can be viewed with show plot.

add

Show individual additive model components on the data plots.

The opposite is setplot noadd.

area, noarea

After setplot area is entered, plot data and plot ldata will show the data divided by the response effective area for each particular channel.  plot residuals will necessarily also be affected by this.  Usual plotting is restored by setplot noarea.  If data is associated with more than 1 response, the response effective area is calculated by simply summing the contributions from each response.

background, nobackground

When running plot data or plot ldata, also show associated background spectra (if any). 

channel

Change the x-axis on data and residual plots to channels.

command

Add a PLT command to the command list.

 

setplot command <PLT command>

 

where <PLT command> is any valid PLT command. very time you use setplot command, that command is added to the list that is passed toPLT when you use plot or iplot. The most common use of setplot command is to add a common label to all plots produced. You should be careful when using this command, because XSPEC does not check to see if you have entered a valid PLT command.These commands are appended to the list that XSPEC creates to generate the plot and so setplot command will override these values (this can either be a bug or a feature, depending on what you have done!) See also setplot delete and setplot list.

Example:

 

XSPEC12> setp co LA OT Crab {Add the label “Crab” to future plots.

 

delete

Delete a PLT command from the command list.

setplot delete <command #>

where  <command #> is the number of a PLT command that hadbeen entered previously using setplot command.This command isused to delete commands from the list passed to PLT when you use the XSPEC plot or iplot commands.

Example:

XSPEC12> setp co LA OT Testing

//PLT label command

XSPEC12> setp co LWidth 5

//PLT line-width command

XSPEC12> setplot lis

//List the PLT command stack.

1: LAbel OT Testing

2: LWidth 5

XSPEC12> setplot del 1

//Delete the first command in the stack.

XSPEC12> setplot lis

1: LWidth 5

device

Set current plot device.

 

XSPEC12>setplot device  < plot device>

XSPEC12>setplot device  <filename>

XSPEC12>setplot device  <filename>/{ps,cps,vps,vcps}

XSPEC12>setplot device  none

 

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.

Set the device used for plots.

 

PGPLOT devices

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

 

/GIF

Graphics Interchange Format file, landscape orientation

/VGIF

Graphics Interchange Format file, portrait orientation

/NULL

Null device, no output

/PPM

Portable Pixel Map file, landscape orientation

/VPPM

Portable Pixel Map file, portrait orientation

/PS

PostScript file, landscape orientation

/VPS

PostScript file, portrait orientation

/CPS

Colour PostScript file, landscape orientation

/VCPS

Colour PostScript file, portrait orientation

/TEK4010

Tektronix 4010 terminal

/GF

GraphOn Tek terminal emulator

/RETRO

Retrographics VT640 Tek emulator

/GTERM

Color gterm terminal emulator

/XTERM

XTERM Tek terminal emulator

/ZSTEM

ZSTEM Tek terminal emulator

/V603

Visual 603 terminal

/KRM3

Kermit 3 IBM-PC terminal emulator

/TK4100

Tektronix 4100 terminals

/VT125DEC

VT125 and other REGIS terminals

/XDISP

pgdisp or figdisp server

/XWINDOW

X window window@node:display.screen/xw

/XSERVE

An /XWINDOW window that persists for re-use

Examples:

XSPEC12> setplot device /xt

//sets the device to the xterm.

XSPEC12> setplot device none

//closes the plot file.

energy

Change the x-axis on plots to energy in units of keV.

 

setplot energy

 

group

Define a range of spectra to be in the same group for plotting purposes only.

 

setplot group <spectrum range>...

 

where  <spectrum range> is a range of contiguous spectra to be treated as a single spectrum for plotting purposes. The spectra still are fit individually. If multiple ranges are given, each range becomes a single group. Initially, all spectra read in are treated as single spectra.  (See also ungroup.)

Examples:

Assume that there are five spectra currently read in, all of them ungrouped initially.

XSPEC12> setplot group 1-4

//The first four spectra are treated as one group, with the fifth

//spectra on its own. Thus all plots will appear to have two spectra.

XSPEC12> setplot group 1 2 3 4

//The spectra are reset to each be in their own group.

XSPEC12> setplot group 2-3 4-5

//Now there are three plot groups, being spectrum 1, by itself, and

//spectra 2-3 and 4-5 as groups.

XSPEC12> setplot group 1-**

//All the spectra are placed in a single plot group.

id

Switch on plotting of line IDs.

 

setplot id <temperature> <emissivity limit> <redshift>

 

The IDs are taken from the APEC line list for the temperature given by the first argument. The plot only shows those lines with emissivities above the limit set and the lines are redshifted by the amount specified. Currently theAPEC version used is 1.10. If xset apecroot has been used to reset the APEC files then setplot id uses a filename based on the value of apecroot as described in the documentation for the apec model.

list

List all the PLT commands in the command list.

 

setplot list

 

See setplot delete for an example of use.

noadd

Do not show individual additive model components on the data plots.

 

setplot noadd

 

The opposite is setplot add.

noid

Switch off plotting of line IDs.

 

setplot noid

 

The opposite is setplot id.

rebin

Define characteristics used in rebinning the data (for plotting purposes ONLY).

 

setplot rebin <min significance> <max # bins> <plot group> <error type>

 

In plotting the data from a spectrum (or group of spectra, see setplot group), adjacent bins are combined until they have a significant detection at least as large as  <min significance> (in s).However, no more than <max # bins> may be so combined. Initial values are 0. and 1, respectively. This argument effects only the presentation of the data in plots. It does not change the fitting, in particular the number of degrees of freedom. The values given are applied to all the plotted data in the plot group specified as the final argument. To change the rebinning simultaneously for all the plot groups give anegative value of the plot group.

The <error type> argument specifies how to calculate the error barson the new bins. The default is quad which sums in quadrature the errors on the original bins. sqrt uses sqrt(N)where N is the number of counts in the new bin, poiss-1 uses 1+sqrt(N+0.75), poiss-2 uses sqrt(N-0.25), and poiss-3 is the arithmetic mean of poiss-1 and poiss-2. If background is present its error is calculated by the same method then added in quadrature to the source error.

Examples:

XSPEC12> setplot rebin 3 5 1

//Bins in plot group 1 are plotted that have at least 3sigma,

//or are grouped in sets of 5 bins.

XSPEC12> setplot rebin 5 5

//The significance is increased to 5sigma.

XSPEC12> setplot rebin,,10,-1

//All plotted bins can be grouped into up to 10 bins in reaching the

//5sigma significance criterion.

XSPEC12> setplot rebin ,,,sqrt}

//Uses sqrt(N) to calculate error bars.

 

splashpage  (on|off)

When set to off, the usual XSPEC version and build date information will not be printed to the screen when the first plot window is initially opened.  This is intended primarily for the HERA installation of XSPEC.

 

ungroup

Remove previous grouping set up by setplot group, resetting all spectra to be in a distinct plot group.

wave

Change the x-axis on plots to wavelength in units of angstroms.setplot wave. This command also makes ignore and notice operate in terms of wavelength rather than energies.

xlog  (on | off)

Set the x-axis to logarithmic or linear respectively for energy or wavelength plots. xlog has no effect on plots in channel space (recall that the default for energy plots is logarithmic: xlog allows the user to override this setting).  xlog and ylog will not work for model-related plots (eg. model, ufspec, and their variants) as their axes are always set to log scale.

ylog  (on | off)

Set the y-axis to logarithmic or linear respectively for energy or wavelength plots. For plot instructions that are explicitly logarithmic ( plot ldata, plot lcounts) the state of the ylog setting is ignored.  xlog and ylog will not work for model-related plots (eg. model, ufspec, and their variants) as their axes are always set to log scale.

next up previous contents
Next: Setting Commands Up: Plot Commands Previous: plot