.BG
.FN x11
.TL
X11 Device Driver
.CS
x11(ask=FALSE,geometry="",reverse=-1,display="",close=F)
.AG ask
should device driver print the message "GO?"
to ask permission to clear the graphics window?
.AG geometry
is the X11 geometry specification for the graphics window.
If geometry is the null string (the default) then the S.geometry entry in the
resource database or the users .Xdefaults file is consulted. If both
the geometry specification and the S.geometry resource are empty then
the default geometry is "400x400".
.AG reverse
is the X11 preference for the background and foreground of the
graphics window.  If reverse is -1 (the default) then the
S.ReverseVideo entry in the resource database (or .Xdefaults file) is
consulted.  If that is missing then the window has a white background
with black writing.  If reverse is 0 then the window is white with
black writing, if reverse is 1 then the window is black with white writing.
.AG display
is the name of the X11 display device.  If `display' is the null
string (the default), the value of the DISPLAY environment variable is used.
The default is usually adequate if S is running on the same machine as the
graphics display.
Otherwise, you will need to use something like `gauss:0' to run
on a machine called `gauss'.
The UNIX man page for `X' has more information on constructing display names.
.AG close
should the previous X11 window be closed?
Ordinarily, the X11 driver just
`unmaps' (X11 jargon for `erases')
the graphics window when another device driver is invoked or when
graphics.off() is called.
Subsequent calls to x11() cause the window to re-appear where it was
before; `display', `geometry' and `reverse' are ignored.
Setting `close'=T causes the driver to close the old window and start
again from scratch.
.PP
This device driver is used on a workstation running the X Version 11
Window System (X11).
When the driver is started, a window
that will
contain the graphics output appears on the screen.
Depending on the window manager the window may just appear or the user
may be asked to position and size the window.
This window can be repositioned and reshaped
arbitrarily; whenever the window is changed, the current plot will be
redrawn to fit in the new window.
.PP
When graphic input (`identify', `locator') is requested,
the cursor in the graphics window changes to a crosshair.
Use the mouse to position the cursor and hit button 1 or button 2
to make a selection.  Button 3 terminates the graphic input.
.SH "COLOR AND TEXTURE"
S believes that all color can be described by a single number.
The X11 driver uses the X resource database to map numbers into colors
and textures.
It uses the following resources:
.nf
   nColors: the number of color/texture combinations
   color0: the background color (col=0)
   color1: the color to use when col=1
     ...
   colorn-1: the color to use when col=n-1
   texture1: the texture to use when col=1
   texture2: the texture to use when col=2
     ...
   texturen-1: the texture to use when col=n-1
.fi

Colors are anything that X will recognize as a legitimate color.
They are ignored on monochrome displays.
Textures are small numbers that select bitmaps internal
to the driver.  (The numbering scheme for textures is the same as the `col='
parameter in earlier monochrome X11 drivers.)
.SH COMMENTS
The textures do not work well on color displays.  There ought to be a
more general way to specify them.
.PP
Menu input is not currently implemented.
.PP
We have only been able to test this device driver on a few X11 servers.
The driver has worked (for us) on black and white (1 bit plane) R2 and
R3 servers running on vaxes (qvss display) and ibm rt's (apa16
display) and on a 4 bit plane black and white vax qdss (X11.R2) display.
It also runs on R3 servers running on Sun BW/2 and CG/4 displays.
.PP
A device must be specified before any graphics functions can be used.
.SH BUGS
If you reshape a window in the middle of a plot, the driver may get confused.
If you reshape a window while doing graphics input, the driver `does' get
confused.
.PP
Fonts are not done properly on color displays.
.KW device
.WR
