1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
|
XGRAPH(1) USER COMMANDS XGRAPH(1)
NNNNAAAAMMMMEEEE
xgraph - Draw a graph on an X11 Display
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
xxxxggggrrrraaaapppphhhh [ options ] [ =WxH+X+Y ] [ -display
host:display.screen ] [ file ... ]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The _x_g_r_a_p_h program draws a graph on an X display given data
read from either data files or from standard input if no
files are specified. It can display up to 64 independent
data sets using different colors and/or line styles for each
set. It annotates the graph with a title, axis labels,
grid lines or tick marks, grid labels, and a legend. There
are options to control the appearance of most components of
the graph.
The input format is similar to _g_r_a_p_h(_1_G) but differs
slightly. The data consists of a number of _d_a_t_a _s_e_t_s. 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 con-
sists 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
xgraph not to draw a line between the points. If the direc-
tive 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 bleast 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
Sun Release 4.1 Last change: December, 1989 1
XGRAPH(1) USER COMMANDS XGRAPH(1)
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 _x_g_r_a_p_h 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. _x_g_r_a_p_h
will then open a new window looking at just that portion of
the graph. _x_g_r_a_p_h also presents three control buttons in
the upper left corner of each window: _C_l_o_s_e, _H_a_r_d_c_o_p_y, and
_A_b_o_u_t. Windows are closed by depressing a mouse button while
the mouse cursor is inside the _C_l_o_s_e button. Typing EOF
(control-D) in a window also closes that window. Depressing
a mouse button while the mouse cursor is in the _H_a_r_d_c_o_p_y
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 speci-
fies the device name. A device name is the same as the
name given for the -P command of lpr(1). If the dispo-
sition 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. _x_g_r_a_p_h takes in
Sun Release 4.1 Last change: December, 1989 2
XGRAPH(1) USER COMMANDS XGRAPH(1)
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 _x_g_r_a_p_h to produce har-
copy output that is suitable for inclusion in other
larger documents. As an example, when this option is
selected the Postscript output produced by xgraph 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 ini-
tially chosen for any given hardcopy device. The value
of this field is hardware specific -- refer to the dev-
ice 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 sup-
ports scalable fonts, the font will be scaled to this
size.
Axis Font Family and Axis Font Size
These fields are like _T_i_t_l_e _F_o_n_t _F_a_m_i_l_y and _T_i_t_l_e _F_o_n_t
_S_i_z_e except they specify values for the font _x_g_r_a_p_h
uses to draw axis labels, and legend descriptions.
Control Buttons
After specifing the parameters for the plot, the "Ok"
button causes _x_g_r_a_p_h to produce a hardcopy. Pressing
the "Cancel" button will abort the hardcopy operation.
Depressing the _A_b_o_u_t button causes Xgraph to display a
window containing the version of the program and an
electronic mailing address for the author for comments
and suggestions.
_x_g_r_a_p_h accepts a large number of options most of which can
be specified either on the command line, in the user's .Xde-
faults or .Xresources file, or in the data files themselves.
A list of these options is given below. The command line
option is specified first with its X default or data file
name (if any) in parenthesis afterward. The format of the
option in the X defaults file is "program.option: value"
where program is the program name (xgraph) and the option
name is the one specified below. Option specifications in
the data file are similar to the X defaults file specifica-
tion except the program name is omitted.
Sun Release 4.1 Last change: December, 1989 3
XGRAPH(1) USER COMMANDS XGRAPH(1)
====WWWWxxxxHHHH++++XXXX++++YYYY ((((GGGGeeeeoooommmmeeeettttrrrryyyy))))
Specifies the initial size and location of the xgraph
window. ----<<<<ddddiiiiggggiiiitttt>>>> <<<<nnnnaaaammmmeeee>>>> These options specify the data
set name for the corresponding data set. The digit
should be in the range '0' to '63'. This name will be
used in the legend.
----bbbbaaaarrrr ((((BBBBaaaarrrrGGGGrrrraaaapppphhhh))))
Specifies that vertical bars should be drawn from the
data points to a base point which can be specified with
-brb. Usually, the -nl flag is used with this option.
The point itself is located at the center of the bar.
----bbbbbbbb ((((BBBBoooouuuunnnnddddBBBBooooxxxx))))
Draw a bounding box around the data region. This is
very useful if you prefer to see tick marks rather than
grid lines (see -tk).
----bbbbdddd <<<<ccccoooolllloooorrrr>>>> ((((BBBBoooorrrrddddeeeerrrr))))
This specifies the border color of the _x_g_r_a_p_h window.
----bbbbgggg <<<<ccccoooolllloooorrrr>>>> ((((BBBBaaaacccckkkkggggrrrroooouuuunnnndddd))))
Background color of the _x_g_r_a_p_h window.
----bbbbrrrrbbbb <<<<bbbbaaaasssseeee>>>> ((((BBBBaaaarrrrBBBBaaaasssseeee))))
This specifies the base for a bar graph. By default,
the base is zero.
----bbbbrrrrwwww <<<<wwwwiiiiddddtttthhhh>>>> ((((BBBBaaaarrrrWWWWiiiiddddtttthhhh))))
This specifies the width of bars in a bar graph. The
amount is specified in the user's units. By default,
a bar one pixel wide is drawn.
----bbbbwwww <<<<ssssiiiizzzzeeee>>>> ((((BBBBoooorrrrddddeeeerrrrSSSSiiiizzzzeeee))))
Border width (in pixels) of the _x_g_r_a_p_h window.
----ddddbbbb ((((DDDDeeeebbbbuuuugggg))))
Causes xgraph to run in synchronous mode and prints out
the values of all known defaults.
----ffffgggg <<<<ccccoooolllloooorrrr>>>> ((((FFFFoooorrrreeeeggggrrrroooouuuunnnndddd))))
Foreground color. This color is used to draw all text
and the normal grid lines in the window.
----ggggwwww ((((GGGGrrrriiiiddddSSSSiiiizzzzeeee))))
Width, in pixels, of normal grid lines.
----ggggssss ((((GGGGrrrriiiiddddSSSSttttyyyylllleeee))))
Line style pattern of normal grid lines.
----llllffff <<<<ffffoooonnnnttttnnnnaaaammmmeeee>>>> ((((LLLLaaaabbbbeeeellllFFFFoooonnnntttt))))
Label font. All axis labels and grid labels are drawn
Sun Release 4.1 Last change: December, 1989 4
XGRAPH(1) USER COMMANDS XGRAPH(1)
using this font. A font name may be specified exactly
(e.g. "9x15" or "-*-courier-bold-r-normal-*-140-*") or
in an abbreviated form: <family>-<size>. The family is
the family name (like helvetica) and the size is the
font size in points (like 12). The default for this
parameter is "helvetica-12".
----llllnnnnxxxx ((((LLLLooooggggXXXX))))
Specifies a logarithmic X axis. Grid labels represent
powers of ten.
----llllnnnnyyyy ((((LLLLooooggggYYYY))))
Specifies a logarithmic Y axis. Grid labels represent
powers of ten.
----llllwwww wwwwiiiiddddtttthhhh ((((LLLLiiiinnnneeeeWWWWiiiiddddtttthhhh))))
Specifies the width of the data lines in pixels. The
default is zero.
----llllxxxx <<<<xxxxllll,,,,xxxxhhhh>>>> ((((XXXXLLLLoooowwwwLLLLiiiimmmmiiiitttt,,,, XXXXHHHHiiiigggghhhhLLLLiiiimmmmiiiitttt))))
This option limits the range of the X axis to the
specified interval. This (along with -ly) can be used
to "zoom in" on a particularly interesting portion of a
larger graph.
----llllyyyy <<<<yyyyllll,,,,yyyyhhhh>>>> ((((YYYYLLLLoooowwwwLLLLiiiimmmmiiiitttt,,,, YYYYHHHHiiiigggghhhhLLLLiiiimmmmiiiitttt))))
This option limits the range of the Y axis to the
specified interval.
----mmmm ((((MMMMaaaarrrrkkkkeeeerrrrssss))))
Mark each data point with a distinctive marker. There
are eight distinctive markers used by xgraph. These
markers are assigned uniquely to each different line
style on black and white machines and varies with each
color on color machines.
----MMMM ((((SSSSttttyyyylllleeeeMMMMaaaarrrrkkkkeeeerrrrssss))))
Similar to -m but markers are assigned uniquely to each
eight consecutive data sets (this corresponds to each
different line style on color machines).
----nnnnllll ((((NNNNooooLLLLiiiinnnneeeessss))))
Turn off drawing lines. When used with -m, -M, -p, or
-P this can be used to produce scatter plots. When
used with -bar, it can be used to produce standard bar
graphs.
----pppp ((((PPPPiiiixxxxeeeellllMMMMaaaarrrrkkkkeeeerrrrssss))))
Marks each data point with a small marker (pixel
sized). This is usually used with the -nl option for
scatter plots.
Sun Release 4.1 Last change: December, 1989 5
XGRAPH(1) USER COMMANDS XGRAPH(1)
----PPPP ((((LLLLaaaarrrrggggeeeePPPPiiiixxxxeeeellllssss))))
Similar to -p but marks each pixel with a large dot.
----rrrrvvvv ((((RRRReeeevvvveeeerrrrsssseeeeVVVViiiiddddeeeeoooo))))
Reverse video. On black and white displays, this will
invert the foreground and background colors. The
behaviour on color displays is undefined.
----tttt <<<<ssssttttrrrriiiinnnngggg>>>> ((((TTTTiiiittttlllleeeeTTTTeeeexxxxtttt))))
Title of the plot. This string is centered at the top
of the graph.
----ttttffff <<<<ffffoooonnnnttttnnnnaaaammmmeeee>>>> ((((TTTTiiiittttlllleeeeFFFFoooonnnntttt))))
Title font. This is the name of the font to use for
the graph title. A font name may be specified exactly
(e.g. "9x15" or "-*-courier-bold-r-normal-*-140-*") or
in an abbreviated form: <family>-<size>. The family is
the family name (like helvetica) and the size is the
font size in points (like 12). The default for this
parameter is "helvetica-18".
----ttttkkkk ((((TTTTiiiicccckkkkssss))))
This option causes _x_g_r_a_p_h to draw tick marks rather
than full grid lines. The -bb option is also useful
when viewing graphs with tick marks only.
----xxxx <<<<uuuunnnniiiittttnnnnaaaammmmeeee>>>> ((((XXXXUUUUnnnniiiittttTTTTeeeexxxxtttt))))
This is the unit name for the X axis. Its default is
"X".
----yyyy <<<<uuuunnnniiiittttnnnnaaaammmmeeee>>>> ((((YYYYUUUUnnnniiiittttTTTTeeeexxxxtttt))))
This is the unit name for the Y axis. Its default is
"Y".
----zzzzgggg <<<<ccccoooolllloooorrrr>>>> ((((ZZZZeeeerrrrooooCCCCoooolllloooorrrr))))
This is the color used to draw the zero grid line.
----zzzzwwww <<<<wwwwiiiiddddtttthhhh>>>> ((((ZZZZeeeerrrrooooWWWWiiiiddddtttthhhh))))
This is the width of the zero grid line in pixels.
Some options can only be specified in the X defaults file or
in the data files. These options are described below:
<<<<ddddiiiiggggiiiitttt>>>>....CCCCoooolllloooorrrr
Specifies the color for a data set. Eight independent
colors can be specified. Thus, the digit should be
between '0' and '7'. If there are more than eight data
sets, the colors will repeat but with a new line style
(see below).
<<<<ddddiiiiggggiiiitttt>>>>....SSSSttttyyyylllleeee
Specifies the line style for a data set. A string of
Sun Release 4.1 Last change: December, 1989 6
XGRAPH(1) USER COMMANDS XGRAPH(1)
ones and zeros specifies the pattern used for the line
style. Eight independent line styles can be specified.
Thus, the digit should be between '0' and '7'. If
there are more than eight data sets, these styles will
be reused. On color workstations, one line style is
used for each of eight colors. Thus, 64 unique data
sets can be displayed.
DDDDeeeevvvviiiicccceeee
The default output form presented in the hardcopy dia-
log (i.e. "Postscript", "HPGL", etc).
DDDDiiiissssppppoooossssiiiittttiiiioooonnnn
The default setting of whether output goes directly to
a device or to a file. This must be one of the strings
"To File" or "To Device".
FFFFiiiilllleeeeOOOOrrrrDDDDeeeevvvv
The default file name or device string in the hardcopy
dialog.
ZZZZeeeerrrrooooWWWWiiiiddddtttthhhh
Width, in pixels, of the zero grid line.
ZZZZeeeerrrrooooSSSSttttyyyylllleeee
Line style pattern of the zero grid line.
AAAAUUUUTTTTHHHHOOOORRRR
David Harrison University of California
BBBBUUUUGGGGSSSS
- Zooming in on bar graphs doesn't work right.
- There is no way to produce hardcopy without running xgraph
interactively.
Sun Release 4.1 Last change: December, 1989 7
|