17.7 Controlling the server
In principle the user shall be able to do things which change the appearance of
plots after the server is started. Not all features described below are implemented
at the present time.
positioning the plotting area in the page
By default there is a single plotting area in the page (although in principle
one can try and
environment variable), which occupies a region controlled
environment variable, as follows
The remainder of the plot area is used for standard annotations.
- the top half in default mode
- almost all the window if plotcomment short
- all the window if plotcomment none
changing plot axes
One can let the plot set the extrema of the axes automatically, or
set them explicitly
xaxis and yaxis
environment variables. One may also explicitly
xscale and yscale
environment variable to lin or log.
changing plot colours
There are several environment variables which control
the colour of various pens (for the X-11 and colour PostScript servers). There are
8 fundamental "plot" colours always available for plotting , in addition, by using
a negative colour number, one may refer to "image" colours in the colour lookup
table described below. The fundamental colours are :
- 0 black
- 1 white
- 2 red
- 3 green
- 4 blue
- 5 cyan
- 6 magenta
- 7 yellow
handling colour tables
There are commands to load the RGB colour tables used for image displays.
The graphics servers use two sets of colours, the above listed fundamental
colours for vector plotting, and a colour table (Look-Up Table, LUT) for
The size and content of the LUT are (partially or fully) under user control.
- The black-and-white PostScript server default LUT is a 256-level gray table
(and of course it does not much sense to edit it).
- The colour PostScript server default LUT is also a 256-level table, initialized
to gray, but is under complete user control (which may use and redefine up to
- The X-11 server LUT could in principle be as long as 256 colours, but in practice
it is limited by the number of colours already allocated by the workstation X
server (on a Motif session this is usually about 30). One may allocate n colours
from a start location j in the workstation default colourmap, provided that there
are n consecutive locations free. One possibility is to allocate a small (n=16,32)
number of colours to each server instance. Exclusive allocation is needed only
if one wants to redefine colours. Otherwise one can share the LUT of another, non-XAS
application, and just tell XAS to "start from j" guessing where the other application's
The following two commands represent a PROVISIONAL interface.
readlut [ startc ncol
prints on the terminal screen the RGB values of the ncol colours starting
at location startc. If ncol is positive, it is assumed that
startc is relative to the current server instance start "j", if ncol is
negative, one conventionally assumes that startc is absolute in the
workstation X colourmap.
writelut [ startc ncol rgb ...
usually loads into the graphics server LUT ncol colours, each one specified
as an RGB triplet rgb, from given location startc. However this
command can be used to perform different tasks :
This command is practical only to edit the content of one or a few colours. IT IS
PLANNED to have a dedicated command to load entire LUTs. In the meanwhile a command
file can be used in conjunction with writelut to load long tables.
- writelut 0 0 prints on the terminal screen the current start "j" as
the particular graphics server instance thinks it is.
- writelut j 0 redefine the current start to the absolute location "j".
- writelut 0 n loads n colours in a new XAS LUT from beginning.
- writelut k n loads n colours from the k-th location in the current LUT.
resizing the plot window
In principle the screen window used by the X11 graphics server can be resized
using the mouse. The way this is done is dependent on the particular window
manager. The graphics server will do its best to cope with this at the next
plot, but, since it is not ICCCM compliant, unpredictable results are possible.
We remind also that the backing store of an already plotted window when obscured
(partially or totally) is demanded to the window manager, which may cease to
mantain it at any time.
changing page size and orientation
Currently the PostScript server uses only portrait orientation on A4 paper.
It is planned to have a controlserver program in the future for
the handling of page (or window) size and orientation changes.
disposing of print files
Currently the PostScript server opens a new file each time a new page is
plotted upon. At the same time the previous file is properly closed. The
last file is closed when
the server. There are currently no actions to dispose of (e.g. print) the
files ; this is left to the care of the user.
It is planned to have a controlserver program in the future
capable of disposing of plot files.
choice of fonts
All graphics servers choose the font in which text is plotted using a conventional
font number (default is number 1). The mapping between font numbers and actual
fonts can be customized by copying the files xwfont.list (for the X-window
server) and psfont.list (for the PostScript server) from the
$XASTOP/include directory to one of the following directories (they will
be consulted in this order of precedence) :
- the current working directory (for customization done personally by each
user for a particular purpose)
- the user home directory (for customization done personally by each
user for all of hir sessions)
- $XASTOP/local (for customization done by the XAS installer for
all users on a given system)
- $XASTOP/include will be used if no customization was applied. The
files in this directory shall NEVER be modified.
Note that the choice of the font size in points is kept separate from the choice
of the typeface for the PostScript server, while standard X11 names must be used
for the X-window server.