Graph

The selections in the Graph pulldown menu allow the modification of graph parameters. There are popups for setting the scaling of the axes, the number of tick marks to display, legends, writing annotative text, and drawing objects such as lines and boxes.

xmgr uses 3 coordinate systems in drawing a graph. These are the world, viewport, and device coordinate systems (following Foley and Van Dam). The world coordinates system is the one in which the data are defined and constitutes the user's coordinate system. The viewport coordinate system (in xmgr), is a rectangle defined by the points (0.0, 0.0) or the lower left corner of the device and (1.0, 1.0) or the upper right corner of the device. The pipeline for drawing objects on the screen or hardcopy device is a pair of linear transformations that carry points in world coordinates to the viewport and then on to the device coordinate system. The upshot is that an object located in world coordinates can be drawn in various parts of the screen or hardcopy device depending on the scaling while an object located in viewport coordinates remains in the same spot regardless of the world scaling. Strings, lines, boxes, and the graph legend can be located in either world or viewport coordinates.



World scaling

Define the world coordinate system by filling in the items Xmin, Xmax, Ymin, and Ymax. The plot is drawn in world coordinates in a rectangle described by the two points (Xmin, Ymin), (Xmax, Ymax). The input is scanned for arithmetic expressions so setting Xmin = -PI and Xmax = PI is legal input (see the section on transformations for a description of the syntax and available functions). The tick spacing can also be set in this popup by filling in the items for the major and minor spacing for each axis. `Update world/ticks' is used, when, occasionally, the state of the items used to define the world scaling get out of sync with what is actually used to draw the graph, clicking on this item synchronizes the internal values with the displayed values. Press the button marked Accept to inform xmgr of the changes.

Note: make sure Xmin


Viewport

Define the viewport by filling in the items Xmin, Xmax, Ymin, Ymax. Viewport coordinates run from (0.0,0.0), the lower left corner of the screen or hardcopy device, to (1.0,1.0), the upper right corner of the screen or hardcopy device. Press the button marked Accept to make the change to the new viewport. Press the Pick view button to use the mouse to define the viewport. Take the mouse to the lower left corner of the desired viewport and press the left button (there is no need to hold the button down). A rubberband box will show you the current size of the viewport you may select. When you are satisfied with the view, press the left mouse button again to activate the new viewport.

Press the button marked Close to close the Viewport popup.


Autoscale

Use the Autoscale popup to set parameters associated with autoscaling. Select the axis to scale, or none. Selecting none allows the autoscale type and the number of ticks to create to be set but no autoscaling is done. Select the particular set to use or All. The Autoscale type sets the method of autoscaling, either Heckbert or fixed. Heckbert uses a method based on routines posted to the net by Paul Heckbert and generates nice looking tick spacing, but alters the scaling of the axes. The fixed option uses the minimum and maximum values in the set (or over all sets) to set the scale of the axes. Select the number of tick marks to use for defining the tickmark spacing (in the case of Heckbert scaling, these settings are advisory only). The item labeled Apply to: allows the autoscaling of the current graph, or all active graphs.


Draw options

Set the amount of scrolling, linked scrolling (scrolling the current graph scrolls all graphs), automatic redraw, and whether the screen is erased before refreshing the screen.


Title/subtitle

The title and subtitle are strings that appear centered at the top of the plot. Fill in the items indicated and press the button marked Accept. To change the font, color, or character size used for titles use the items from the popup denoted Props....


Ticks/tick labels

Set the spacing and type of major and minor tick marks, definition of axes labels, and toggle features associated with the drawing of the graph axes.

The top item, Edit, selects the axis for which the feature selections will apply. There are two axes defined for each co-ordinate direction, the primary axis and the zero axis. The primary axis will be used the most, the zero axis is, by default, turned off. The button to the right of the Edit item labelled Props... allows the axis to be offset by a specified amount in viewport co-ordinates. The item Axis label accepts the definition of the label to be used when drawing the axis. Various properties of the label may be set in the popup just below labeled Axis label props....

The two items `Major tick spacing' and `Minor tick spacing' set the spacing of major and minor ticks. Tick labels are drawn based on the setting for the major tick spacing. These items are duplicated in the `Define world' popup described previously. Fill in the appropriate blanks and press Accept to refresh the display. The units are positive deltas starting with the world minimums. Input is run through the scanner so expressions are allowed. The are special symbols dx and dy for setting a prescribed number of tick marks. Dx is the distance along the X-axis and dy is the distance along the Y-axis, as defined in the current window of the world coordinate system. Typing at Major tick spacing "dx/10" will give 10 major tickmarks.

Tick labels, tick marks, the axis bar, may be toggled by the check boxes. Properties for each of these can be set by the Props... popups associated with each item.

Properties for tick labels are:

Font
Which font to use when drawing the labels.
Color
Which color to use.
Line width
Width of line to use when drawing the label.
Char size
Size of characters to use.
Format
Decimal, exponential, power, general plus several time and date formats. To use the time and date formats, the data are required to be in Julian Date format, the long version. Two auxillary programs, jul2greg and greg2jul, are available with the distribution to assist in the conversion from Julian to Gregorian date formats.
Stagger
each tick label may be offset with respect to its neighbor, the levels of staggering ranging from 0 to 3, This is especially useful with some of the time and date formats.
Precision
sets the number of places to display to the right of the decimal point for the labels.
Skip every
tick labels are drawn at every major tick mark, use the skip factor to circumvent this.
Start labels at
Graph minimum, or specified. To start the labels at some other point than the graph minimum, fill in the text item to the immediate right with the value where tick labels are to begin. There is a similar item in the property sheet for tick marks that can be used to set where the major tick marks begin. between these two, there should be sufficient flexibility.
Stop labels at
same as above only works at the other end of the axis.
Layout
allows the tick labels to be drawn horizontally, vertically, or a specified angle (in degrees).
Draw tick labels
which side of the graph to draw tick labels, either the normal side (the bottom of the graph in the case of the X-axis, or to the left of the graph in the case of the Y-axis), The opposite side, or both. This can be handy when using multiple axes, or overlaying graphs with differing scales.
Sign
allows the numerical value of the label to be displayed as is, as its absolute value, or negated. This can be used to effectively reverse the sense of the axis (negate), or reflect the axis about zero (absolute value).
Apply to
Override the selected axis from the Ticks/tick label popup, causing the settings to be selected for all axes in the current graph, the current axis for all graphs, or all axes in all graphs.

Press the button Accept when everything is OK, or Close to close the popup.

Properties for tick marks are:

Tick mark direction
in, out, or both. Which direction the ticks point.
Tick marks on
Which side of the graph to draw ticks. The normal side is the bottom of the graph in the case of the X-axis, or to the left of the graph in the case of the Y-axis, the default is to draw ticks on both sides.
Major tick length
sets the length of major tick marks
Minor tick length
sets the length of minor tick marks
Major grid lines
a check box that when toggled on, grid lines will be drawn at the settings for major tick marks.
Minor grid lines
a check box that when toggled on, grid lines will be drawn at the settings for minor tick marks.
Color, line width, and line style
These items set the characteristics of the lines use to draw ticks and grid lines.
Apply to
allows the axis select in the Ticks/tick label popup to be overidden, causing the settings to be selected for all axes in the current graph, the current axis for all graphs, or all axes in all graphs.

Press the button Accept when everything is OK, or Cancel to close the popup.

Properties for the axis bar are:

Color, line width, and line style items set the characteristics of the lines use to draw ticks and grid lines.

Press the button `Accept' when everything is OK, or `Cancel' to close the popup.

IMPORTANT NOTE FOR LOG PLOTS: When log scaling is selected for a particular axis or axes, the meaning of major and minor ticks changes slightly. Major ticks should be set to integer values. Use minor ticks to set the number of interdecade tickmarks, these should be set to integer values ranging from 0 (no interdecade tickmarks) to 5. A value of 1 will draw each interdecade position, 2 will skip every other position, etc.


Frame

The frame is the box drawn around the clipping region of the graph, and the region inside. Items in the frame popup are:

Frame
Turn the frame on or off.
Style
Either `closed' or `open.
Color
Set the color of the line drawn around the graph.
Line width
Set the width of the line around the graph.
Line style
Set the line style of the line.
Fill graph background
Toggle the filling of the frame.
Background color
The color with which to fill the frame.
Press Accept to register the settings, Close to close the popup.


Symbols

The items in the symbols popup allow the selection of symbols, lines, and fill style to be used when drawing a set.

Items in the symbols popup are:

Select set
The set to which the following items will apply.

Symbol:

Symbol
Select the symbol to use, or none for no symbol.
Fill
Select the fill option, none, filled, or opaque. The opaque option allows the symbol to be filled with the background color (white as of this writing) overwriting the line used to connect each point.
Size
Set the size of the symbol.
Char
select a character to use instead of a symbol (not active)
Skip
select the number of points to skip when drawing symbols
Legend
A string defining the legend to use for this set
Apply to
either this set or all sets

Line:

Style
select the line style for the lines connecting the points in the set.
Width
select the line width for the lines.
Color
the color to use when drawing lines.

Fill:

Fill
select the type of fill, none, as polygon, to y=0.0, x=0.0, x=graph Xmin, x=graph Xmax, y=graph Ymin, y=graph Ymax.
Fill using
either Color or Pattern.
Color
select the color to use, or none.
Pattern
select the pattern to use or none There are three additional buttons in this popup that can be used to set the colors, symbols, and line widths in an incremental fashion, avoiding the need to specify a each.

NOTE: There are limits on how large a set can be for the fill to operate correctly. The limit for the display is approximately 8000 points, for the hardcopy drivers, this limit drops to around 800-1000.

Symbols descriptions:

NOTE: symbols 16-29 do not appear in the legends


Error bars

Error bars are created by reading in the data as a set with error bars (see Files above). Properties of error bars are set by opening the `Error bar props' popup.

Size
Set the length of the error bar.
Line width
Set the line width of the error bar.
Line style
Set the line style of the error bar.
Riser
Toggle the display of the line connecting the error bar with the data point.
Riser line width
Set the width of the riser.
Riser line style
Set the riser line style.
Display
Toggle the display of the error bar.


Legends

Legend items:

Legend on/off
toggle the display of the graph legend
Legend location type
Select the coordinate system to use when interpreting the legend x, and legend y items described below. Either the world or viewport coordinates. Legends placed in viewport coordinates make the legends stay put as the plot scale changes. Legends placed in world co-ordiantes will float as the graph scaling is changed.
Legend gap
specify the vertical gap between legend entries
Legend length
specify how long the line representing the set should be.
Legend X
X value of legend location
Legend Y
Y value of legend location
Font
specify the font for the legend labels
Frame
toggle a box drawn around the legend. The three items below set the line color, line width, and line style of the box.
Fill frame
toggle the fill of the box around the legend. The frame fill will obliterate anything beneath, grid lines, sets, etc. Set the type of fill either color or pattern and the corresponding color or pattern.
Legend gap and Legend length
These items refer to the gap between legend items and the length of the legend in units of characters (arbitrary).

Clicking Place is a convenient method of placing the legend on the canvas. After pressing this button, move the mouse pointer to the desired location and press again with the left button. The location will be in world or viewport coordinates as selected above.

Press Load comments to make the set comment (generally the file name from where the set originated) the legend label. This affects all active sets in the current graph.

Press the button marked Accept to register the legend settings.

Press the button marked Close to close the popup.


Strings & Things

The numbers of strings, lines, and boxes are fixed, open File/About to see what the limits are for your version of xmgr. To define a text string to be drawn on the canvas:

Select font, pen, justification, rotation (in integer degrees [0,360]), size. Press the button marked "Text" to activate the text writing routines. Move the mouse to the canvas and press the left mouse button at the desired location and type away. Press to advance to the next line - the right mouse button to stop. The text cursor does not behave properly for rotated strings. To redefine string parameters you'll need to press the right button to leave text mode - adjust the parameters and press "Text" again to inform xmgr of the changes and resume writing. The cycle "Position in: World | viewport coordinates" allows the string position to be defined in the world coordinate system or viewport coordinates. The difference is that in World coordinates the string position on the display will change as the plot is re-scaled. Placing the string in viewport coordinates will force the string to remain in the same place as the plot scale is changed.

NOTE: It is necessary to press to register the string.

To define a line or box to be drawn on the canvas:

The cycle "Position in: World | viewport coordinates" allows the line (box) position to be defined in the world coordinate system or viewport coordinates. The difference is that in World coordinates the line (box) position on the display will change as the plot is re-scaled. Placing the line (box) in viewport coordinates will force the line (box) to remain in the same place as the plot scale is changed.

Lines:

Set the properties of the line using View/Strings & things/Line props if needed.

Click on Line.

Click at the start of the line, and again at the end of the line to define the line.

Boxes:

Set the properties of the line using View/Strings & things/Line props if needed.

Click on Box.

Click on one corner of the box, then click again on the opposite corner to define the box

Move:

To move a line, box or string:

Press the button marked "Move", this should change the cursor to the "move" cursor.

Press the left mouse button near the object to be moved.

Move the cursor to the new location and press the left mouse button. To delete a line, box, or string:

Press the button marked "Delete", this should change the cursor to a bullseye cursor.

Press the left mouse button near the object to be deleted.

NOTE: The right mouse button cancels all operations (true throughout xmgr with respect to mouse operations).

Lines and boxes drawn in world coordinates scale with the plot, to draw fixed length boxes and lines, use viewport coordinates.


Flip X-Y

Release the right mouse button on "Flip X-Y" to swap the positions of X and Y (all sets, tickmarks, and labels will be swapped).


Invert X

Reverse the sense of the X-axis making increasing X toward the left. This is performed by making the graph viewport minimum greater than the maximum.


Invert Y

Reverse the sense of the Y-axis making increasing Y toward the left. This is performed by making the graph viewport minimum greater than the maximum.


Time stamp

Set the display of a string containing the current time. This string is updated each time the graph is redrawn.


Misc.