Top Up Prev Next Bottom Contents Index Search

20.3 Detailed description

The input format is similar to the Unix command graph(1G) but differs slightly. The data consists of a number of data sets. Data sets are separated by a blank line. A new data set is also assumed at the start of each input file. A data set consists of an ordered list of points of the form <directive> X Y. The directive is either draw or move and can be omitted. If the directive is draw, a line will be drawn between the previous point and the current point (if a line graph is chosen). Specifying a move directive tells pxgraph not to draw a line between the points. If the directive is omitted, draw is assumed for all points in a data set except the first point where move is assumed. The move directive is used most often to allow discontinuous data in a data set. The name of a data set can be specified by enclosing the name in double quotes on a line by itself in the body of the data set. The trailing double quote is optional. Overall graphing options for the graph can be specified in data files by writing lines of the form <option>: <value>. The option names are the same as those used for specifying X resources (see below). The option and value must be separated by at least one space. An example input file with three data sets is shown below. Note that set three is not named, set two has discontinuous data, and the title of the graph is specified near the top of the file.


TitleText: Sample Data
0.5 7.8 
1.0 6.2 
"set one"
1.5 8.9 
"set two"
-3.4 1.4e-3 
-2.0 1.9e-2 
move -1.0 2.0e-2 
-0.65 2.2e-4 

2.2 12.8 
2.4 -3.3 
2.6 -32.2 
2.8 -10.3 

After pxgraph has read the data, it will create a new window to graphically display the data. The interface used to specify the size and location of this window depends on the window manager currently in use. Refer to the reference manual of the window manager for details.

Once the window has been opened, all of the data sets will be displayed graphically (subject to the options explained below) with a legend in the upper right corner of the screen. To zoom in on a portion of the graph, depress a mouse button in the window and sweep out a region. Pxgraph will then open a new window looking at just that portion of the graph. Pxgraph also presents three control buttons in the upper left corner of each window: Close, Hardcopy, and About. Windows are closed by depressing a mouse button while the mouse cursor is inside the Close button. Typing EOF (control-D) in a window also closes that window. Depressing a mouse button while the mouse cursor is in the Hardcopy button causes a dialog to appear asking about hardcopy (printout) options. These options are described below:

"Output Device" Specifies the type of the output device (e.g. "HPGL", "Postscript", etc.). An output device is chosen by depressing the mouse inside its name. The default values of other fields will change when you select a different output device.
"Disposition" Specifies whether the output should go directly to a device or to a file. Again, the default values of other fields will change when you select a different disposition.
"File or Device Name"
If the disposition is "To Device", this field specifies the device name. A device name is the same as the name given for the -P command of lpr(1). If the disposition is "To File", this field specifies the name of the output file.
"Maximum Dimension"
This specifies the maximum size of the plot on the hardcopy device in centimeters. Pxgraph takes in account the aspect ratio of the plot on the screen and will scale the plot so that the longer side of the plot is no more than the value of this parameter. If the device supports it, the plot may also be rotated on the page based on the value of the maximum dimension.
"Include in Document"
If selected, this option causes pxgraph to produce hardcopy output that is suitable for inclusion in other larger documents. As an example, when this option is selected the Postscript output produced by pxgraph will have a bounding box suitable for use with psfig.
"Title Font Family" This field specifies the name of a font to use when drawing the graph title. Suitable defaults are initially chosen for any given hardcopy device. The value of this field is hardware specific -- refer to the device reference manual for details.
"Title Font Size" This field specifies the desired size of the title fonts in points (1/72 of an inch). If the device supports scalable fonts, the font will be scaled to this size.
"Axis Font Family and Axis Font Size"
These fields are like "Title Font Family" and "Title Font Size" except they specify values for the font pxgraph uses to draw axis labels, and legend descriptions.
"Control Buttons" After specifying the parameters for the plot, the "Ok" button causes pxgraph to produce a hardcopy. Pressing the "Cancel" button will abort the hardcopy operation. Depressing the About button causes pxgraph to display a window containing the version of the program and an electronic mailing address for the author for comments and suggestions.


Top Up Prev Next Bottom Contents Index Search

Copyright © 1990-1997, University of California. All rights reserved.