HTML automatically generated with rman
Table of Contents

Name

tabplot - general table plotter

Synopsis

tabplot in=infile [parameter=value]

Description

tabplot plots datapoints from an ascii table, optionally connects the datapoints by lines, plots different styles for the points and (if available) uses different colors. It can also bin the data in X, and compute/plot error-bars in X and Y derived from the dispersion within those bins.

tabplot can also plot one-to-many, many-to-one as well as pair-wise plotting. However, it is (not yet) possible to pair-wise plot from multiple files with different number of rows. See also paste(1) or tabmath(1NEMO) how to combine tables.

tabplot is really intended for quick and dirty display of the data. For more complicated plots, full plotting packages should be used (Mongo, SM, WIP, gnuplot, Grace, matplotlib etc.), though moderately sophisticated plots can also be made using layout=. The readline= is available to give some degree of interactive usage.

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=infile
input file, in (ASCII) tabular format [no default].
xcol=x-column
column(s) from which the X values are taken. Multiple columns can be taken, but if so, the number of Y columns must be the same for pairwise plotting. [default 1].
ycol=y-column
column from which the Y values are taken. Multiple columns can be given. The number of X columns can either be 1 or must be equal to the number of Y columns. [default 2].
xmin=x_min
Minimum value along X-axis to include [default: minimum of datapoints].
xmax=x_max
Maximum value along X-axis to include [default: maximum of datapoints].
ymin=y_min
Minimum value along y-axis to include [default: minimum of datapoints].
ymax=y_max
Maximum value along y-axis to include [default: maximum of datapoints].
xbin=boundaries
When used either the number of datapoints used to average to a plotted datapoint or the bin boundaries (in X-world-coordinates) must be given. The program can distinguish from both cases by the number of variables given to this keyword. One means fixed number of datapoints used in averaging, more than one means the numbers are bin boundaries. The output is controlled using tab= and contains the mean X, Y followed by the dispersion in X and Y and the number of points in that bin. [default: not used, datapoints from file are used].
point=type,size
Pairs of integers, (one pair for each plotted column) describing the point type (0=none, 1=point, 2=circle, 3=plus, 4=square) and size in cm (see also yapp(3NEMO) ). Pairs not specified inherit from the last one entered. Default: 1,0.1
line=type,width
Pairs of integers, (one pair for each plotted column) describing the line type and width (see plltype(3NEMO) ). Default: 0,0
color=color
Integer denoting color. This will be yapp(3NEMO) specific. Colors not specified will inherit from the last one entered. Default: not used (i.e. default drawing color used)
errors=x|y|xy
Specify which error bars to draw in case binning is used. If error bars are used in either raw X or Y columns, this option cannot be used. Default: none.
xlab=x-label
Label along the X-axis [default: X].
ylab=y-label
Label along the Y-axis [default: Y].
xcoord=x1,x2,...
A list of numbers (see nemoinp(3NEMO) for valid syntax) that will cause vertical lines at these X coordinate to be drawn. Default: none
ycoord=y1,y2,...
Y coordinates for the horizontal lines, same as xcoord=.
xbox=
Extent of the plotting frame in the X direction. [Default: 2:18]
ybox=
Extent of the plotting frame in the Y direction. [Default: 2:18]
nxticks=
Number of tickmarks along the X axis. This divides the X axis in nxticks+1 pieces. [Default: 7].
nyticks=
Same for Y.
xscale=
Scaling factor applied to all X values. Default: 1
yscale=
Scaling factor applied to all Y values. Default: 1
dxcol=
Columns representing error bars in X. These currently need to match the xcol=. By default no error column(s) are used.
dycol=
Columns representing error bars in Y. These currently need to match the ycol=. By default no error column(s) are used.
nmax=
Maximum number of lines that are allocated in pipes. [10000]
median=f|t
Use median to compute "average" binning values. It is used to compute the X as well as Y coordinates of the binned point, however error bars are still computed using the mean. Default: f.
headline=text
Random verbiage, will be plotted along right top of plot for id. [default: none]. The left top will contain the filename infile.
tab=t|f
Output table to stdout if binning is used? Default: false;
fullscale=t|f
Use full scale in one axis if other axis is autoscaled? In versions older than 2.0 fullscale was always on (t), by default it is now off (f).
cursor=
This will be the name of an ascii file that will contain coordinates that have been marked with the cursor, not the nearest datapoint (currently only implemented for PGPLOT). Cursor keys are in the usual definition: A=left mouse will mark, D=middle mouse has no function, X=right mouse will exit. Default: not used.
layout=
Optional Layout file that contains draw commands. Default: none.
first=t|f
Should the layout file be called first or last ? [f]
readline=t|f
After all batch plotting is done, should an interactive layout annotator (see also layout(5NEMO) ) be called. [f]
pyplot=
If given, it will be the filename where a template python script that can serve as starting point for more elaborate plotting. Default: none.

See Also

tabhist(1NEMO) , snapplot(1NEMO)

Bugs

tab= doesn’t work properly with multiple columns

Examples

Here is an example working with layout files.
  % nemoinp 1:20 | tabmath - -  ’ranu(0,1),ranu(0,1)’ all > ran.tab
  % tabmath ran.tab - ’2+%1*16,2+%2*16,0.2’ all | awk ’{print "circle",$0}’ > ran.layout
  % tabplot ran.tab 1 2 0 1 0 1 layout=ran.layout
It plots the data points from the file ran.tab as dots, and converts, using tabmath and awk, these to a layout file where the same points as plotted as open circles in ran.layout. Note that currently the user has to convert to yapp (cm) units, and actually know that most yapp plots runs from 2 to 18 cm in both X and Y. This will likely change in a future version where points can be given in a more reasonably WCS.

Here are some examples of plotting multiple columns/rows, assuming each example of the tab1 and tab2 table has 2 columns:

   % paste tab1 tab2 | tabplot - 1 4                     headline=x1,y2
   % tabmath tab1,tab2 - %1-%3,%2-%4 all | tabplot - 1 2 headline=dx,dy
   % paste tab1 tab2 | tabplot - 1,3 2                   headline=x1,x2,y1
   % paste tab1 tab2 | tabplot - 1   2,4                 headline=x1,y1,y2
   % paste tab1 tab2 | tabplot - 1,2 3,4                 headline=(x1,y1),(x2,y2)

See Alsotablsqfit(1NEMO), tabmath(1NEMO), yapp(5NEMO) http://vostat.org

http://www.star.bris.ac.uk/~mbt/stilts/ 
AuthorPeter Teuben Files
~/src/kernel/tab    tabplot.c

Update History


25-nov-88    V1.0 - created      PJT
13-nov-90    V1.1 deleted nmax= by using file_lines()    PJT
26-jan-95    V1.5a multi-column plotting support, trickmarks, extra coord lines    PJT
14-feb-96    V1.6 added cursor= keyword (*PGPLOT only*)    PJT
7-may-98    V2.0 added median= for binning method    PJT
25-jul-98    V2.0b added line=lwidth,lstyle w/ lstyle<0 histogram (thank Kartik)    PJT
31-mar-99    V2.1 autoscaling now takes range in other axis into account    PJT
28-jul-99    V2.2 added color=
21-jul-00    V2.3 min & max can be separately set    PJT
2-aug-02    V2.5 allow number of x columns to be > 1    PJT
17-sep-05    V2.8 added readline= and documented first=    PJT
2-dec-05    V2.9 implemented missing many-to-one plotting mode    PJT
20-dec-05    V3.0 added xscale,yscale and started dxcol,dycol. Fixed xbin= bug    PJT
10-oct-06    V3.0e finished dxcol=, dycol=    PJT
8-jan-2020    V4.0 added pyplot=    PJT


Table of Contents