GOPLOT

NAME
SYNOPSIS
DESCRIPTION
PLOT_STRING FORMAT
PRE-PLOTTING COMMANDS
PLOTTING COMMANDS
PLOT BEAUTIFICATION COMMANDS
AUTHORS

NAME

goplot - front end for the GRI plotting program

SYNOPSIS

goplot plot_string [prefix] < Candis_file

DESCRIPTION

Goplot is a Go program that translates command line commands into plotting commands for the GRI plotting package. (See https://github.com/dankelley/gri -- note that the version of GRI on SourceForge is out of date.)

Documentation for usage can be viewed by invoking goplot with no command line arguments. The input commands are contained in the first command line argument. The gri output is written to a file and gri is run on it automatically. The resulting postscript file is displayed using gv. If the optional prefix is specified, the gri and postscript files are retained as prefix.gri and prefix.ps and the plot is not displayed. Otherwise they are deleted.

PLOT_STRING FORMAT

The plot_string command line argument is made up of one or more commands separated by the character ’/’. Each command in turn is composed of components separated by the character ’,’. If a ’/’ or ’,’ is needed in a component it should be preceded by the character ’~’ so that it is not confused with a separator. A literal ’~’ must itself also be preceded by a ’~’ in order to distinguish it from its escape character role.

There are three types of commands: (1) pre-plotting commands, (2) plotting commands, and (3) plot beautification commands. Commands within each grouping may be intermixed. However, pre-plotting commands must be executed first, plotting commands second, and beautification commands third. Command components enclosed in square brackets are optional.

If you would like to make multiple subplots, use the fg command to set a location for the new plot and then invoke all of the commands for the new plot. Subplots must use data from the same input file. If you wish to plot multiple lines on one plot, simply use multiple plotting commands without using the fg command between them.

PRE-PLOTTING COMMANDS

/sx,sy,lm,bm,fg/ - Define figure size. sx and sy define the figure dimensions in cm. lm and bm define the left and bottom margins in cm. Defaults are 10, 10, 6, 6 cm.

/missing_val,mv/ - Sets missing value (default 1e30)

/size,fs/ - Sets font size (points, 12 default)

/axis,format,nf/ - Sets the format of axis numbers. The axis should be x or y and the format should be d (default font) or o (numbering suppressed). If numbering is turned off, it needs to be turned on explicitly for the next plot if multiple plots are being made.

/xtype,ytype,ty/ - Sets the type of the two axes with options of either linear or log.

/xmin,xmax,dx,ymin,ymax,dy,ax/ - Sets the range of the axes and at what points the tic marks are placed. xmin and xmax define the range of the x axis, etc. dx and dy are the intervals where labeled increments will be located on each of the axes.

/label,lx/ - Labels the x axis. The default label will be the x variable given in the plotting command.

/label,ly/ - Labels the y axis. The default label will be the y variable given in the plotting command.

PLOTTING COMMANDS

At least one of these commands must be issued.

/x,y,var[,cmap,val1,val2,dval[,gridsize]],f/ - This command produces a shaded filled plot from gridded data. Optional command cmap with choices of 1, 2, or 3 for color maps. val1 and val2 define the range of the data. dval is the increment for stepped fills. The default grid size is 128 by 128 pixels.

/x,y,var[,c,lw,dash[,val1[,val2,incr]]],c/ - This command produces a contour plot. c gives the line color with valid color options of r,g,b,c,m,y,w,n,k. Note: The contour labels will appear with this color as well. The width of the line is set with lw with range from 0.1 to 5.0. dash sets the line type with 0 being a solid line, and 1, 2... being different length dashes. The range of the plot is defined by val1 and val2. If only val1 is given, a single contour will be generated. incr gives the increment of the contours. The contour labels disappear when contour values or ranges are specified.

/x,y,u,v,uscale,vscale,xdecim,ydecim,v/ - This command generates a gridded vector plot with u and v vector components. uscale and vscale define the number of axis units per vector unit. xdecim and ydecim are the decimation factors for vector data on the x and y axes. A value of 1 plots vectors for all points, 2 omits every other point, etc. The Candis program cdfgriv is automatically invoked to put vector data in gri form.

/x,y,u,v,uscale,vscale,s/ - This command generates vector plots from a list (1-D field) of positions and vector components. The vector locations are therefore arbitrary in contrast to the v command, which plots vectors on a rectangular grid. Aside from this the command arguments have the same meanings as in the v command. (The xdecim and ydecim arguments are not needed as they apply only to gridded plots.)

/x,y[,c[,lw[,dash,[legend,xloc,yloc]]]],p/ - This command produces a line plot of y vs x. c, lw, and dash are as given for contour plots. legend will produce a legend for the plot at xloc, yloc.

/x,y[,c[,size[,symbol,[legend,xloc,yloc]]],m/ - This command creates a point plot of y vs x with the specified symbol. size sets the size of the symbols in cm. The color of the symbols is set by c with the options as described above. The type of symbol is given by symbol. Legal symbols are p (plus), m (times), b (box), c (circ), d (diamond), t (triangle), a (asterisk), fb (filled box), fc (bullet), fd (filled diamond), and ft (filled triangle). legend will produce a legend for the plot at xloc, yloc.

/[location,[left_value,right_value,increment,]]fp/ - This command creates a filled palette to be used in conjunction with the fill command and should be invoked after the fill. "location" is either "t" for top of plot or "r" for right side of plot, with "t" being the default. "left_value", "right_value", and "increment" specify the range and labeling of colors in the palette. This range should be slightly bigger than the range specified in the fill command to get the full range of colors displayed. The default takes values from the "f" command. Note that this is a problem if the increment is specified as zero there. In this case the long form of "fp" must be used. (Note that "increment" is the spacing of labels, not of color changes in the color bar.)

PLOT BEAUTIFICATION COMMANDS

/xlo,ylo,xhi,yhi[,c[,lw[,dash]]],dl/ - This command draws a line on the plot from (xlo, ylo) to (xhi, yhi). c, lw, and dash are as given for contour plots.

/label,xloc,yloc,ll/ - This command draws a label on the plot at xloc, yloc.

/title,tl/ - Draws title on the top of the plot.

AUTHORS

Created by Violet Replicon, modified by David Raymond.