2d_plot

General Purpose

This is a general xy plotting program. There can be an unlimited number of graphs loaded into the program at one time. Multiple curves can be drawn on each graph. Various attributes of the graphs can be controlled thru user interface or command line. Initial curve attributes are set thru the input data file.

Topics

Input File | Graph Settings | Mouse | Curve Attributes | Scaling | Command Line | Print

Input File

The input file requires a few special character lines in addition to the two columns of data to plot. These special characters allow you to add a title, x and y axis labels, and curve labels to each plot. The special characters are:

T - signals the creation of a new plot. adds a title to the new plot

Y - labels the y axis

X - labels the x axis

L - signal the creation of a new curve on same graph. Labels the curve with a color coded curve and key at the bottom of the screen. Amarker can be used as well if desired. if many curves are added to the plot, the key will run down below the window. in this case, use the right mouse button to drag the image up when reading the key.

The format looks like this:

T<title for the first plot>
Y<label for the y axis>
X<label for the x axis>
L<label for a curve!<marker>!>
xvalues         yvalues
   :                    :
   :                    :

at minimum you need to have a line with a T and a line with an L at the top of the data file.

Graph Settings

The number of the graph that is currently being viewed, is shown in the field just after the
" graph # " label. The left and right arrows let you increment or decrement the current graph number or you can enter a graph number in the field. The current graph can also be decremented and incremented by clicking the MIDDLE and RIGHT mouse buttons in the graph window.

If the "all graphs" toggle is on, changes to made any curve attributes will be applied to all the graphs. When it is off, only the current graph will be updated with the change.

Toggle off "show legend" to remove the curve labels from the bottom of the screen.

Mouse

Left Mouse button - click and drag the image around to see curve labels in the legend below the screen.

Middle Mouse button - click to decrement the current graph number

Right Mouse button - click to increment the current graph number

Curve Attributes

The widgets on the line after the "curve #" label, all control attributes for the curves. The first pulldown shows the curve number. All the attributes of that curve on the current graph are shown in the pulldowns after it. Color, line or no line, and symbol for each curve can be changed. The choices for the symbol are:

"None" - either using line only or excluding curve from graph,
"char" - any character on the keyboard can be used, enter character in following field
"point" - draw a point in the exact coordinates instead of using the character "period".
"box" - square marker

Scaling

The following options can be set for the X and Y axis.

min-max -enter the scale range for each axis on the plot
num ticks - enter the number of ticks on each axis
tick labels - set tick labels to be integers or reals
reset- resets the min and max values for the x and y axis of the current plot to the default.

Command Line

Format

2d_plot [filename][-nxtick (int)] [-nytick (int)]
              [-xminmax (real)(real)][-yminmax (real)(real)]
              [-xticklab (int)][-yticklab (int)]

-nxtick - number of ticks in x axis
-nytick - number of ticks in y axis
-minmax - min and max value for xaxis (first plot only)
-minmax - min and max value for yaxis (first plot only)
-xticklab - 0 for x tick label to be integer, 1 for real
-yticklab - 0 for y tick label to be integer, 1 for real

Print -

Left/Right/To/Bottom Margin - set the margin for each edge. increasing the margin on top to 1.5 shows the title of the plot.

Margin default - resets margins to 1.00 1.00 0.75 1.50

Preview - shows what the plot will look like using showps. showps has some more options on viewing this plot such as zoom and orientation.

Print - sends plot to a printer

Color - toggle on for color plot otherwise its black and white

Print to file - send printout to a ps file instead of directly to a printer.