By default, when PyXPlot is used interactively, all plots are displayed on the screen. It is also possible to produce postscript output, to be read into other programs or embedded into LaTeX documents, as well as a variety of other graphical formats. The set terminal command†gnuplot users should note that the syntax of the set terminal command in PyXPlot is rather different; see Section 3.2. is used to specify the output format that is required, and the set output command the file to which output should be directed. For example,
set terminal postscript set output 'myplot.eps' plot sin(x)
would produce a postscript plot of to the file myplot.eps.
The set terminal command can also be used to configure further aspects of the output file format. For example, the following would produce black-and-white and colour output respectively:
set terminal monochrome set terminal colour
The former is useful for preparing plots for black-and-white publications, the latter for preparing plots for colourful presentations.
Both encapsulated and non-encapsulated postscript can be produced. The former is recommended for producing figures to embed into documents, the latter for plots which are to be printed without further processing. The postscript terminal produces the latter; the eps terminal should be used to produce the former. Similarly the pdf terminal produces pdf files:
set terminal postscript set terminal eps set terminal pdf
It is also possible to produce plots in the gif, png and jpeg graphic formats, as follows:
set terminal gif set terminal png set terminal jpg
More than one of the above keywords can be combined on a single line, for example:
set terminal postscript colour set terminal gif monochrome
To return to the default state of displaying plots on screen, the x11 terminal should be selected:
set terminal x11
For more details of the set terminal command, including how to produce transparent gifs and pngs, see Section 3.2.
We finally note that, after changing terminals, the replot command is especially useful; it repeats the last plot command.. If any plot items are placed after it, they are added to the last plot.