[Top] [Prev] [Next] [Bottom]

3.2 Other Controls

3.2.1 animate: Control Animation Mode

Calling Sequence

animate ( [0/1])

Description

Without any arguments, toggle animation mode; with argument 0, turn off animation mode; with argument 1 turn on animation mode. In animation mode, the X window associated with a graphics window is actually an offscreen pixmap which is bit-blitted onscreen when an fma() command is issued. This is confusing unless you are actually trying to make a movie, but results in smoother animation if you are. Generally, you should turn animation on, run your movie, then turn it off.

3.2.2 palette: Set or Retrieve Palette

Calling Sequence

palette ( filename)
palette ( source_window_number)
palette ( red, green, blue[, gray][, query = 1]
[, ntsc = 1/0])

Description

Set (or retrieve with query = 1) the palette for the current graphics window. The filename is the name of a Gist palette file; the standard palettes are "earth.gp", "stern.gp", "rainbow.gp", "heat.gp", "gray.gp", and "yarg.gp". Use the maxcolors keyword in the pldefault command to put an upper limit on the number of colors which will be read from the palette in filename.

In the second form, the palette for the current window is copied from window number source_window_number. If the X colormap for the window is private, there will still be two separate X colormaps for the two windows, but they will have the same color values.

In the third form, red, green, and blue are 1-D arrays of unsigned char (Python typecode "b") and of the same length specifying the palette you wish to install; the values should vary between 0 and 255, and your palette should have no more than 240 colors. If ntsc=0, monochrome devices (such as most laser printers) will use the average brightness to translate your colors into gray; otherwise, the NTSC (television) averaging will be used (.30*red+.59*green+.11*blue). Alternatively, you can specify gray explicitly.

Ordinarily, the palette is not dumped to a hardcopy file (color hardcopy is still rare and expensive), but you can force the palette to dump using the window() or hcp_file() commands.

3.2.3 plsys: Set Coordinate System

Calling Sequence

plsys (n)

Description

Set the current coordinate system to number n in the current graphics window. If n equals 0, subsequent elements will be plotted in absolute NDC coordinates outside of any coordinate system. The default style sheet "work.gs" defines only a single coordinate system, so the only other choice is n equal 1.

You can make up your own style sheet (using a text editor) which defines multiple coordinate systems. You need to do this if you want to display four plots side by side on a single page, for example. The standard style sheets "work2.gs" and "boxed2.gs" define two overlayed coordinate systems with the first labeled to the right of the plot and the second labeled to the left of the plot. When using overlayed coordinate systems, it is your responsibility to ensure that the x-axis limits in the two systems are identical.

3.2.4 redraw: Redraw X window

Calling Sequence

redraw ()

Description

Redraw the X window associated with the current graphics window.



[Top] [Prev] [Next] [Bottom]

support@icf.llnl.gov
Copyright © 1997,Regents of the University of California. All rights reserved.