/XWINDOWopens a window that disappears when PGEND is called.
/XSERVEopens a window that persists for reuse after PGEND is called.
The device name specifies the X-window display to use, the screen of that display and the PGPLOT window number to use.
window number is a small integer used to identify
individual windows created by PGPLOT. You can either specify the
number of an existing inactive window to reuse, or provide a new
number to assign to a new window. If the number is omitted or
specified as zero, then either the last window to become inactive will
be reused, or a new window will be created and assigned the lowest
unused window number. The number of each window is displayed in the
title of the window.
host part of the specification is the address of
the host on which the display resides. If a DECNET address is used,
the host name should be separated from the display number by two
colons instead of one.
display part of the specification is the number of the
display server on the given host. Usually this is 0, but if you
have multiple X terminals connected to the same machine, then each
terminal is generally assigned a different display number.
screen number is also usually 0, but if your display has
multiple screens, then each is identified by a small integer.
For example "
PGPLOT window 2 as a
/xwindow window on host
foo.wherever.edu. Note that the @ symbol is optional
if the display name is omitted. Thus "
opens window 2 on the default display.
PGPLOT_XW_WIDTH[fractional display width]
If the first available colormap type happens to match that of the
default colormap of the screen, and enough colors are available
therein, then that colormap is used. Otherwise, allocation of a
private colormap is attempted. If this fails, the device is
treated as monochrome. The default color-map type can be overriden
pgxwin.Win.visual resource described below.
However, if the requested colormap type is not available, the
driver reverts to its default colormap search strategy.
By default the driver tries to allocate 100 colors. This number
usually makes it possible to have two windows displayed
simultaneously without having to allocate a private colormap. This
helps to avoid colormap flashing as the pointer is moved between
windows. You can override this default with a number in the range
2 to 255 by using the
.Xdefaultsin your home directory. Under VMS they should be placed in
DECW$USER_DEFAULTS:DECW$XDEFAULTS.DAT. Note that by default DECW$USER_DEFAULTS is defined as SYS$LOGIN. Resource specification is discussed further in the "Potential problems" section further below.
The following resource descriptions show how a resource line should be constructed in one's resource file. Where default values are available they are indicated. Otherwise the value is indicated symbolically and instructions are given for substituting appropriate values.
pgxwin.Win.crosshair: True pgxwin.win2.crosshair: Falsestipulates that all windows except PGPLOT window 2 will use a crosshair for the default cursor. Note that Win is spelt with an upper case initial 'W', whereas win# is spelt with an initial lower-case 'w'. This is important because all resource names are case sensitive.
A better example of the utility of targeting options at specific windows is the following:
pgxwin.Win.geometry: 500x500+600+360 pgxwin.win1.geometry: 500x500+600+33This example places the first PGPLOT window in one position on the display, and all other windows in a second location - thus avoiding obscuring the first by the second etc..
Similarly if one wanted to dedicate one window to line graphics, one could designate a specific window number to have a reduced number of colors.
pgxwin.win10.maxColors: 16This window would then be selected using a device specification of "10/xserve".
If pgxwin_server fails to start automatically, see the "Potential problems" section below on how to remedy this. However, if for some reason it is necessary to run pgxwin_server manually, you'll need to know the following. In particular, under VMS, before you can run the server you will first need to register it as a foreign command, by typing:
pgxwin_server:=="$directory_name:pgxwin_server.exe"If your default display is correctly set then simply typing:
pgxwin_serverwith no arguments should start the server, and the server icon should appear on the display. If an alternate display is desired then the default display can be overridden with the -display argument. Other options to override selected X resources from the command-line are also available. To see them type:
If you are still unable to get the server to start automatically, please send me Email at mcs·astro.caltech.edu. In the meantime, you can work around the problem by starting the server by hand, as described previously.
The X resource database is compiled by the pgxwin_server program when it is started. Resources set after it has been started are ignored and pgxwin_server will need to be restarted before they are acquired. There are a number of places in which the server can find resources, and your specifications will not be seen if they appear in the wrong place. pgxwin_server attempts to follow the rules laid down by the X Toolkit. First it looks for a RESOURCE_MANAGER property on the root window of your display. This contains a list of resource names and values and comes into being when the standard xrdb program is applied to a resource file. It is common for xrdb to be applied automatically to your Xdefaults file, or to a system supplied xdefaults file when the X server is first started. If this is the case then changes to your Xdefaults file will be ignored until the server is restarted or you explicitly re-run the xrdb command.
If - and only if - the RESOURCE_MANAGER property does not exist, then under UNIX pgxwin_server looks for a file called .Xdefaults in your home directory, and under VMS it looks for a file called DECW$USER_DEFAULTS:DECW$XDEFAULTS.DAT. If it finds this file, it initializes its resource database from it. It then also looks to see if the XENVIRONMENT environment variable contains a valid file name and if so reads resources from that file, overriding any contrasting resources from your Xdefaults file.
To be sure that changes to resources in your Xdefaults are seen by pgxwin_server you should use the xrdb command to install them on the display:
$ xrdb -nocpp decw$user_defaults:decw$xdefaults.datIf the xrdb command is not defined on your system, then first execute:
Then terminate pgxwin_server by quiting its icon and ask for /xw or /xs again to restart it.