SPEX User's Manual - SRON
SPEX User's Manual - SRON
SPEX User's Manual - SRON
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
34 Syntax overview<br />
par write mypar overwrite - <strong>SPEX</strong> writes all parameters for the model to a file named mypar.com.<br />
Any previously existing file mypar.com is overwritten.<br />
par write mypar - Same command as above, but now a new file is created. If there already exists a file<br />
with the same filename <strong>SPEX</strong> will give an error message.<br />
2.22 Plot: Plotting data and models<br />
Overview<br />
The plot command cause the plot to be (re)drawn on the graphics device. Multiple graphics devices can<br />
be defined in one <strong>SPEX</strong> session. For example, a plot can be sent to both a postscript and a xs device.<br />
A user can also set the number of plot frames in the currently active device(s), e.g. the data and model<br />
can be displayed in one frame while the residuals can be displayed in a frame below. The user has to<br />
specify what is to be plotted in in each frame.<br />
In each plot frame, there can be different sets that can be specified by the ”set” keyword in the plot<br />
command. For example, for the plot type data, each set corresponds to the spectrum of an instrument<br />
or region; with this option it is therefore possible to give different instruments different colours or plot<br />
symbols, etc., or just to omit one of the instruments from the plot.<br />
The plot command is also used to select the axis plot units and scales as well as character commands like<br />
font style, line weights, plot colours, etc. Finally, the plot command can also be used to dump the data<br />
to an ascii file.<br />
Warning: To make a plot, always start with a ”plot device” command to open any plot device you wish.<br />
Next select a plot type using ”plot type”. After this you can give any plot commands to modify or display<br />
the plot.<br />
Syntax<br />
The following syntax rules apply for plot:<br />
plot - (Re)draws the plot on the graphics device. Take care to open at least one device first (with a ”plot<br />
dev” command)<br />
plot frame new - Creates a new additional plot frame, where an other plot type can be displayed (or the<br />
same plot type but with different units). Take care to position the viewport of the new and old frames<br />
to the desired locations.<br />
plot frame #i - Sets frame number #i to be the currently active frame. After this command has been<br />
issued, all plot commands will only affect the currently active frame.<br />
plot frame delete #i - Deletes frame number #i.<br />
plot type #a - Specifies what is to be plotted in the selected frame. #a can be any of the plot types<br />
specified in Sect. 4.2.<br />
plot device #a1 [#a2] - Selects a graphics device #a1 and optional file name #a2 (in the case of a<br />
postscript or gif device). File extensions (for example .ps) should be specified. For valid devices, see<br />
Sect. 4.1.<br />
plot close #i - Close graphics device number #i. Note, always close a postscript device before quiting<br />
/spex, otherwise the contents may be corrupted.<br />
plot hlan - Make a hardcopy in landscape orientation and send it to the standard printer. Use is made<br />
of the unix command ”lp -c filename”.<br />
plot hpor - As above, but for portrait orientation<br />
plot x lin - Plot the x-axis on a linear scale<br />
plot x log - Plot the x-axis on a log scale<br />
plot y lin - Plot the y-axis on a linear scale<br />
plot y log - Plot the y-axis on a log scale<br />
plot y mix #r1 #r2 - Plot the y-axis on a mixed linear/logarithmic scale; for y-values below #r1 the<br />
data will be plotted linear, and for y-values above #r1 the data will be plotted logarithmically; the linear<br />
part occupies the fraction of the total frame height given by #r2. See also Sect. 4.8.2.