WXP
User's Guide
colors <<
graphics
>> message

Graphics Resources

This describes some of the standard characteristics of all graphical output.

Draw Resource

The draw resource is used to toggle on and off various parts of the plot.   The plot contains two basic regions. The text label areas above and below the plot and the plot itself.  The text labels can appear in six regions around the plot, left, center and right. The plot contains a background map or grid and the data plotted as text, symbols or contours. There is a plot border which is a rectangle surrounding the plot. The other possibility is the radar summary that is separate from data. There are these possible options for draw:

By default, all draw types are turned on. If any of the above are specified, all types are turned off and only those types listed will be turned on. For example, if the data and map are needed but no text labels, specify:

   -dr=map,data

Draw types can be added and removed by putting a "+" or "-" in front of the draw type.  If this is done, the types are not turned off initially.  For example, if only the upper right label and border  is to be removed, specify:

   -dr=-text_ur,-bord

Full Plots

In some cases, it is necessary for the plotted data to fill the entire window.  By default, WXP allots room above and below the plot for labels to be displayed.  To turn this feature off, use the "full" plot parameter.

   -pp=full

Changing Plot Labels

The label resource is used to change the text labels that appear above and below the plot. Each label must by preceded with a location specifier:

ul uc ur

PLOT

ll lc lr

followed by a color ":" and the text. The string may have spaces but the string must be quoted. Underscores can be placed in the string to denote spaces if needed. Multiple labels are separated by commas.

Special Characters

There are special characters that can be used to use date information in the label:

Changing Time Zones

By default, WXP displays all times in universal time (UTC).  The programs use "Z" for the time zone label for simplicity.  To change the time zone displayed on the plots, use the time_zone resource.   The syntax is tz:label:offset.   For example:

   -tz=EST:-5

would plot the time in Eastern Standard Time.  The "EST" is only for the label. The critical part is the time offset "-5" which is the number of hours from UTC.  The result would be a string like "835 EST 14 MAR 10"

To get time to display as AM/PM, add a plus "+" to the beginning of the label "+EST".  The result would be "4:00 PM EST 23 MAR 10".

Color Bar

A color bar can be displayed on the image if the "bar" parameter is set.  It appears in the lower left corner of the plot and shows the colors used in the color fill plot labeled with their associated values:

bar_sample.gif (1006 bytes)

If there are too many labels, appropriate ones will be skipped. If colored plotting is enabled, the color bar can also be used.  If multicolored/multistyles contour lines are used, the color bar will draw colored lines rather than filled regions.  The lines will also reflect the line style.

To set the range of the color bar, specify the max and min values with the "bar:min:max" plot parameter:

   -pa=bar:-10:45

If values for the color fills are listed, these values will be used for the color bar labels exactly as they are listed.

Output to Image Files

There is a GIF image encoder/decoder built into WXP. This allows graphics to be saved in image format for future use and use with web servers. There are three methods for saving images to file:

  1. Automatically by adding "gif=filename" to the output resource. The filename is either a file name convention tag or an exact filename. There are two wildcards that can be placed in the filename: %p which is the program name/window title and %i which is the index of the image in a loop.
  2. Automatically through wxploop's interface program loopset.
    loopset save 0 filename
    The same %p and %i wildcards can be used in the filename.
  3. Manually by hitting <Meta>g in the window. The output will be a file which is the first 5 characters of the window title plus ".gif". The image_path resource value is prepended to the filename. If the image is part of a loop, the image number in the loop is added to the filename "ttttt-##.gif" where ## is the image number starting at 0.

If the program has created a loop of images and the program is looping the images, the image save will save all the images in the loop. If the loop is stopped, only that image is saved to file.

Interlaced GIF Images

To save GIF images in interlaced format, use the "gifinter" plot parameter.

   -pa=gifinter

Inverse Images

By default, WXP uses a black background with data plotted in green and a map in red.  For some applications, it is required for WXP to have white backgrounds. This is especially true for GIF images that go on a web server whose purpose is to be printed. When inverted, only a couple of colors change. First, the background color defaults to white. Any piece of information that is plotted in white is now plotted in black. Those plotted in yellow are now plotted in brown. There are two methods for inverting the image:

  1. Automatically by specifying "inv" for the plot parameter or by setting the wxpinverse environment variable:

       setenv wxpinverse on

    By specifying pscolor for printed output, the colors are automatically inverted.
  2. Manually by changing the background and specific colors to achieve the desired results.

Viewport Specification

In some cases, the user may want control over exactly where in the window the plot is being displayed.  This can be done in a number of ways.  One way is with WXPloop and the geometry specification.  If you are not using WXPloop, the geometry relates to the window and not the plot.  As a result, the viewport size can be specified with the "vp_size" plot parameter.  The syntax is: "dxxdy[+x+y]".   These coordinates represent the fractional panel coordinates. The dx and dy represent the fraction of the overall window ( 0 < dx < 1)   the panel will use. The x and y are the offsets measured from the lower left. For example, to produce a 4 panel plot (2x2) and the current plot is the upper left, the geometry would be:

   -pp=vp_size:.5x.5+0+.5


For further information about WXP, email devo@ks.unisys.com
Last updated by Dan Vietor on March 16, 2010

colors <<
graphics
>> message