C-PLOT

Scientific Graphics and Data Analysis

x11

the X11 graphics filter

DESCRIPTION

The x11 graphics filter creates a separate window for C-PLOT graphics under X Window System window managers. A special feature of the x11 filter is the ability to copy the contents of the filter window into a new window. The detached window will remain on the screen until explicitly removed.

See the xhairs help file to see how to display a cross hairs in the X11 plot window.

C-PLOT pen numbers select many options besides drawing color, as described below.

INITIALIZATION

The filter is invoked using the following command:

zi x11 [-rotate] [-title="this is the title"]

[-geometry=WIDTHxHEIGHT+XOFF+YOFF]

The -rotate option is appropriate for displaying turned plots, that is, those plots drawn in portrait mode using the tu 1 command. The -title option lets you assign the window title-bar text. The -geometry option lets you set the window geometry.

Normally, the display name is taken from the environment variable DISPLAY. If there are multiple screens associated with the display, the screen can be specified by appending a colon and the screen number to the filter name. If the name by which the filter is invoked contains a colon, the display name is formed by concatenating the colon and the characters following to unix. For example, if the filter is named x11:1, the screen to be opened will be unix:1. The system administrator can make links to the x11 file that have the different names.

USER DEFAULTS

The x11 filter obtains user defaults for the following parameters from the user's .Xdefaults database file. The default values of the parameters are indicated.:

! window position
cplot.geometry:    =512x380-0+0
! foreground color
cplot.Foreground:  black
! background color
cplot.Background:  white
! use backing store
cplot.Backstore:   on
! retain image in pixmap
cplot.Retained:    off
! window border width
cplot.BorderWidth: 4
! window border color
cplot.Border:      black
! automatic raise
cplot.AutoRaise:   on

Up to eight graphics windows may be used with C-PLOT simultaneously. Parameters specified in the .Xdefaults file with the keyword cplot will apply to all, unless overridden by the following. Parameters specified with the keyword cplot_1,will apply to the filter selected with the command zf1, parameters specified with the keyword cplot_2 will apply to the filter selected with the command zf2, etc.

If the -rotate flag is used, the geometry values for width and height are reversed.

BACKING STORE AND RETAINED PIXMAP

For the filter window contents to be redrawn when exposed or de-iconified, a copy must be retained in memory. The display firmware or the window manager can do this automatically with backing store enabled, or the x11 filter can retain the image in a pixmap. Which is most efficient depends on the hardware environment. The filter is fastest if neither feature is turned on. However, the filter's window contents then will not be redrawn when obscured portions of the window become visible or if an iconified window is de-iconified. Note that backing store is not always available.

AUTO RAISE

If the AutoRaise parameter is set in to on in the .Xdefaults file, the cplot X11 window will automatically be placed in front of others windows when plots are drawn. Auto-raise mode may also be turned on or off while the filter is running using the special pen numbers listed below.

DOTS

The default C-PLOT symbol (symbol 9) is a dot that scales in size with the line width. These dots are also used with the dotted line (symbol A) and the dot-dashed line (symbol D). On some X11 systems, small dots drawn by the X11 library functions don't come out very well. You can choose fixed pixel arrangements for dots using pen numbers listed in the table below. Note, though, these dots don't change size as the line width is increased.

DETACHED WINDOWS

Pressing control-button with any of the mouse buttons when the cursor is over the filter window will make a detached copy of the window contents and place them in a new window associated with a new process. Any number of detached windows can be made. Pressing control-button when the cursor is over one of the detached windows destroys it. Detached windows always begin as icons and always retain window contents in a pixmap.

PEN ASSIGNMENTS

Pen number assignments in x11 use the following conventions.

0-999 drawing colors
1000-1999 white-fill fill colors
2000-2999 black-fill fill colors
3000-3999 background colors
4000-4999 line widths
5000-5999 symbol outline widths
9001 turns symbol filling on
9002 turns symbol filling off
9003 turns black-filled symbol outlines on
9004 turns black-filled symbol outlines off
9103 turns retained-pixmap on
9104 turns retained-pixmap off
9105 turns backing-store on
9106 turns backing- store off
9107 use round line caps and joins
9108 use butt line caps and beveled joins
9109 turns auto-raise on
9110 turns auto-raise off
9210 symbol 9 (dot) follows pen width
9211 symbol 9 is drawn as single pixel
9212 symbol 9 is drawn as nine-pixel square
9213 symbol 9 is drawn as five-pixel cross
9666 detaches window just as control- button

The colors for pen numbers 1000-1999, 2000-2999 and 3000-3999 correspond to pen colors 0-999. See the colors help file for color assignments.

White and black are the default colors for pens 0 and 1. The user's .Xdefaults may assign different colors. The color associated with pens 0, 1000, 2000 and 3000 track the background color assigned with pens 3002-3999. Pens 1, 1001, 2001 and 3001 track the foreground color assigned with pens 2-999.

For multiplane displays, pen numbers are taken modulus 176 to select a color. Colors in the above table that are not available on the selected display are assigned to the color associated with pen 1.

If the filter determines that the display is single-plane monochrome, only two colors, foreground and background, are available. Pen 0 selects the background color, while higher number pens select the foreground color.