NAME

xplot - X windows plotting program mplot - non X version of the same

SYNOPSIS

xplot [command_filename] [width=] [height=] [command=..]
mplot [width=] [height=]

DESCRIPTION

xplot is an interactive program used to display tabular data using X-window graphics. It steals from John Tonry's Mongo software. The program expects commands telling which columns to plot, how to scale the data, the type of points and line used to connect the points, and labeling information. Commands can be typed in manually or contained in a file included on the command line.

mplot - only reads command lines from stdin and will used the hardcopy command.

If the left mouse button is pressed in the graphical window, the current cursor position (both x and y) will be printed out. It will also be written into the file /tmp/xplot-$LOGNAME.

Two windows are used: commands are typed into the same window that was used to invoke xplot while the graphical display appears in a separate window.

COMMANDS LINE ARGUMENTS

command_filename is the name of a file containing xplot commands.

command= are up to ten commands that may be run after the command file is executed.

height= specifies the height of the plot window in pixels. The default is 400.

width= specifies the width of the plot window in pixels. The default is 640.

COMMANDS

Below is a listing of the commands and their arguments. Commands may be abbreviated their first few letters (enough to make them unique). On-line help is available.

begin - used with the loop command to demarcate the start of an infinite loop. It can only be used in the file command mode.

box - displays the box on the screen with ticks and puts the numerical values of the x and y axes (from the current limits ).

ccolumn N - tells that the data points for the column that contains color values. This is used by the points command.

cfield scale - draws a bunch of circles around the data points read by xcol and ycol. The radius is read by ecolumn. The scale factor can be entered in as a second argument (default:1).

circle radius - draws a circle at the present relocation position with the specified radius.

clear - erases the screen. It is the same as erase.

color color_name | 0xrrggbb - changes the drawing color of subsequent drawing commands or text to the specified value. Legal color names are: "white", "red", "green", "blue", "black", "cyan", "brown", "gold", "navy", "grey", "gray", "magenta", "khaki", "orange", "maroon", "orchid", "pink", "salmon", "tan", "thistle", "violet", "yellow", "wheat". You can also explicitly specify rgb values by a hex number 0xrrggbb where rr are between 0 - ff.

connect [delay] - connects the data that have been read as continuous line of the current line type. An optional time delay (in tenths of a second) can be specified between drawing line segments.

cross stepsize - draws a cross at the present relocation position with the specified step size (distance from orgin to end).

cursor - the Mongo cursor command is not needed.. just press the left button.

data filename - specifies the filename that contains the data. This command is required for most applications.

draw xp yp - draws a line of the current type from the current pen position to (xp, yp) set by the relocate command. The terms min,max can be substituted for the values of x,y and get the maximum found by the limits command.

ecolumn n - sets the n'th column in the data file as the one from which values for the errorbars (or used in vfield and cfield) will be read.

ekey s - sets key to the error column (see above).

end - exits the program same as exit or quit.

erase - erases whe graphics screen. Same as clear.

errorbar K - sets the direction in which errorbars will be drawn from each point. K=0 draws bar to right, K=1 up, K=2 to left, and K=3 down. ecolumn must be invoked first.

exit - exits the program.

expand factor - changes the point size by integer factor.

hardcopy [fname] - sends the displayed graph to the file xplot.jpg unless overridden by option.

help [command] - if used without arguments lists all the commands. With an argument, briefly explains the use of the given command.

hist - connects the points in the x and y columns with horizontal lines as commonly used in a histogram.

input filename - reads a file containing xplot commands. Note: input commands cannot be nested.

Label `string' - puts the given string at the current pen position, defined by relocate without conversion from World to local.

label `string' - puts the given string at the current pen position, defined by relocate.

limits [xmin xmax ymin ymax] [center] - if used without arguments, finds the extreme values of the x and y axes, and sets the plot limits to those values. With arguments, sets all four plot limits explicitly. If an asterisk (*) is substituted for any of the limits, the appropriate extremum value is used. If a minus sign is substituted for any of the limits, the previously determined extremum is used. If center is the last keyword, the usage is limits x_center x_span y_center y_span center.

lines n1 n2 - reads the data only from lines n1 to n2 Data lines starting with the character `#' are interpreted as comments and are skipped.

loop - sends control back to the previous begin command, to create an infinite loop. It can only be used in file command mode. Often used with wait to suspend execution till something happens.

ltype LTYPE n - changes the current line type to various flavors of dots and dashes. The possible types are: 0 = solid, 1 = dotted, 2 = dash-dotted, 3 = dashed.

mindx val - sets the minimum x axis separation.

mindy val - sets the minimum y axis separation.

offset x y - offsets the center of the graph by specified values.

pcolumn n - sets the n'th column as the one from which the length of arrows in vfield will be read.

points - plots the points in the current point type.

plot fname [dummy] -plot file Does the following (very common combo) in order 1. data "file" 2. xc 1 3. yc 2 4. limits 5. box 6. connect.

If you specify an additional dummy argument (any letter will do), it will plot single column data using 'xc 0' and 'yc 1'

ptype [npoints solid]- sets the point type to a n-sided polygon of shape solid where solid=0 for open, solid=1 skeletal, solid=2 starred, solid=3 filled. The point size can be changed by using the expand command.

ptype 0 and points makes tiny dots.

quit - causes program to stop. Same as exit or end.

relocate [xp yp] - sets the current pen position for drawing points, lines or text at (x, y). If used without arguments it displays the current location. The terms min,max can be substituted for the values of x,y and get the maximum found by the limits command.

reverse - changes between black on white to white on black.

save filename - records the subsequent xplot commands to the specified file. This file can then be edited for use by other statements.

spawn - puts the window into the background. The cursor will still work. Hitting the right button will terminate it.

square side - draws a square at the present relocation position with the specified sides.

title `string' - puts the given string along the top of plot.

wait time or wait data Waits for the specified number of seconds before continuing. Or waits for the file specified by the data command to change its file modification time.

vfield - plots a vector field of arrows. The origin of each vector is specified by x and y columns. The angle (measured CCW from x-axis in degrees) is entered by the e-column, and the length of the line is entered in the p-column.

wait seconds - sleeps for the specified number of seconds before proceeding.

xcolumn N - tells that the data points for the x-axis are contained in the Nth column of the file specified by the data command.

xiso N [seconds|minutes|hours|days] - tells that the data in column N is an ISO date time string and converts it to seconds (default), subtracting off the value of the first data point. The optional parameters change the units.

To subtract of a start data see the next command.

isostart yyyy-mm-ddThh:mm:ss - use as start date for iso data.

xkey key - tells that the data is in key=value format and that you want the X axis to read the specified key.

xlabel `string' - puts the given string below the X axis.

xlog - converts all the x-column values to their logarithm to the base10.

ycolumn N - tells that the data points for the y-axis are contained in the Nth column of the file specified by the data command.

ykey key - tells that the data is in key=value format and that you want the Y axis to read the specified key.

ylabel `string' - puts the given string vertically along the Y axes.

ylog - converts all the y-column values to their logarithm to the base10. Any values less than or equal to zero will be set to -50.


XVista index