SATAN Graphics and printing
| GSI | Biophysics | SATAN long write-up |

SATAN graphics and printing

The SATAN graphics is based on X11 for screen graphics and PostScript for paper copies and import into text processing programs like TeX. Pictures are by default also stored on a temporary plotfile (meant for internal access only) which holds the device-independent graphics information. This mechanism allows e.g. a virtual hardcopy of a picture from screen to PostScript without loss of quality.

Display commands are used to draw analyzer spectra on a graphic device providing various modes of one- and two-dimensional representations. Abbreviations for command names may be used as long as they are unique.

Display types

Three major types of displays are supported. Examples:

Spectrum modes

Various modes may be selected for the graphic representation of a spectrum: linear, logarithmic or squareroot y-axis, automatic or fixed y-scaling. There are two possibilities to select a special display mode: Example:
DMOD / LOG                 define logarithmic representation of spectrum
                           contents as global mode
D 1                        display analyzer 1
D / LIN                    display  the  last  analyzer  with  a  linear
                           counts axis
D                          the analyzer is displayed  again with a logarithmic axis

Windows and points

The provide four different possibilities to define windows or single channels (points) in a spectrum. Examples
D 1 / W(#)                 display analyzer 1 in the  limits of the temporary window
DGW A G                    mark display windows A, B, ..., G
DWSUM 1                    return the sum of counts within analyzer condition 1
DSW H                      set limits of display window H by cursor
Each time a spectrum segment is displayed or marked, the sum of counts, mean value and full width at half maximum of this segment are calculated and written to screen and protocol file. The following formulas are used:
sum = SIGMA yi
mean = SIGMA(yixi) / s
fwhm = 2.3548 ( n SIGMA yi(xi-mean)2 / (n-1) sum )1/2
where yi and xi are the data points and n is the number of spectrum bins with non-negative counts. (Bins with negative counts are not considered for mean and width.)

Graphical Input (Cursor)

Usually X-Window devices provide a cursor to locate a point on the screen or to position graphical objects to be drawn with a command. You use the mouse to position the cursor. The buttons of the mouse have the following functions:

Graphic Devices, printing & picture export

At present SATAN supports two kinds of graphic output devices: X-Window screens and PostScript files. By default the current X-Window screen as defined in the environment variable DISPLAY is used. You use the DDEVICE command to define the various output devices.
DDEV           a PostScript file          
DDEV xyz.eps          a PostScript file          
DDEV p65gps           directly to the specified printer
DDEV biori6k:0        X-Window display on host biori6k
DDEV *                current X-Window display
DDEV / CLOSE          closes current output device
Note that the extensions .eps or .ps are significant in order to generate PostScript files. You may use the operating systems commands to actually print PostScript files, e. g. on UNIX
   lp  -dprinter
   lpr -Pprinter
Note further, that DDEVICE/FREE is necessary for a PostScript file before it is sent to a printer, in order to insert a proper end-of-file text.

A temporary plotfile logs all graphics output in a device-independent way and thus pictures on screen can be re-routed to a printer with the DCOPY command The plotfile resides on the temporary filesystem and is always active. If it grows exceedingly large, plotfile logging can be disabled also with the DCOPY/off command.


DCOPY / off            switch off plotfile
DCOPY / on             switch on plotfile
DCOPY p65gps           copy plotfile as PostScript to the specified printer 
DCOPY my.eps           copy plotfile as PostScript to the specified file 

The DCOPY command allows to scale down and to change the orientation of the picture in PostScript. By default a media size of DIN A4 is assumed; the picture is oriented in a way that it best fits the given media. On monochrome printers coloured PostScript pictures appear in grey scale. This does not always look nice. In such cases you might force the DCOPY'd picture to monochrome without affecting the original one. Some

DCOPY / size(A5)              limit output to paper size A5, default orientation 
DCOPY / port                  force portrait orientation
DCOPY / land                  force landscape orientation
DCOPY / palette(mono)         change colours to monochrome

PostScript files in documents

PostScript files generated by SATAN have a bounding box and can immediately be used for inclusion in documents, e.g. LaTeX:

Display attributes

You use the command DATTR to change graphics attributes like colour, line width, line type, etc of the displayed spectra. For each attribute a table with 10 entries is kept. When spectra are displayed, these entries are retrieved by indexing them with a number.

Additional text

Sorry, not yet implemented.

Additional graphics

Sorry, not yet implemented.


Colours are handled by means of the DATTR command.


One-dimensional spectra may be plotted over each other by means of the DOVERLAY command. The overlaid spectra have the same scale by default. However, they may be modified by an offset and a stretch factor.
DOVER 5 / xfac(2)        stretches the x-axis by factor of 2 

Live display

It is possible to visualize the correlation of two parameters accumulated in an analyzer in live mode. This means that for each correlated pair of parameters a point is marked on the screen. Up to four sections of a window may be used for a live display.
DLINIT 2 / POINTS(1000)       defines 2 live displays with 1000 points                                                     
DLIVE Z2 MASS1                plot parameters of analyzer Z2 vs MASS1                                                
DLIVE Z2 MASS2                plot parameters of analyzer Z2 vs MASS2
Instead of a pair of one-dimensional analyzers you may also specify one two-dimensional analyzer. Live mode is particularly effective for analyzers without spectrum (type 0), because the window on screen serves as storage device rather than the computer memory.

The special gd system

Analyzer data can be exported to the gd graphics system allowing the creation of high quality representation graphics for scientific publications using a powerful set of additional graphics commands.

| GSI | Biophysics | SATAN long write-up |

Last updated:, 3-Aug-1999

Impressum Data privacy protection