GENPLOT
Home ›
Software ›
Manual Pages ›
GENPLOT
Section: User Commands (1)
Updated:
Index
Return to Main Contents
NAME
genplot, makeplot - generate X-Y plots in HPGL, from files of numbers
SYNOPSIS
genplot
[options]
makeplot
[options]
DESCRIPTION
Genplot
generates an X-Y plot from columns of numbers.
All input files and parameters are specified via command line options.
The HPGL output is sent to the standard output, which should be
redirected to the file you want to create.
Makeplot
is an easier to use front-end program, that prompts for input
file names and various options, and passes these along to
genplot.
It also saves the output to a file, and if you're on an X
terminal, it displays the result using
xhpgl.
There are some options in
genplot
for which
makeplot
doesn't prompt - these can be provided as option arguments.
It doesn't pass any options on to
xhpgl,
so any X Window options would have to be passed via environment
variables.
HPGL output files can be viewed or converted using the programs
described in
emuhpgl(1),
such as
xhpgl,
they can be printed using
hardcopy(1),
or they can be incorporated into a
layout(1)
file.
Options
Below is a list of the command line options allowed by
genplot.
Each should be specified as a single argument, with no space
between the option code and the following value.
- -xffile
-
Specifies the input file from which the X-axis values will be read.
This file name can be a single hyphen
(-),
which will cause input to be read from the standard input.
The input file should contain lines of real numbers
(floating point numbers in ASCII form), with one or more numbers
per line, separated by spaces, tabs, commas, colons, semi-colons,
or parentheses.
Any number of separators can appear between columns of data, as
columns are counted by the number of data values on the line.
Missing data values on some lines can throw off the count.
If you want a fixed field separator, and only allow one separator
between columns, use the
-f
option below.
Numbers will be read only from the column you specify as
the X-axis input column, using the
-xccolno
option below.
Blank lines are skipped, but any other lines that don't begin with a number
will cause reading to end there, unless it is among those you skip using the
-xlskip
option.
Files generated by
joinnum(1)
are ideal for use as input files here, but they can come from any
other source as well.
- -yffile
-
Specifies the input file from which the Y-axis values will be read,
as for the X-axis file above.
You can use the same file name for both X and Y, if you take
different columns for each axis.
However, the standard input
(-)
should only be specified for one of
these, as it can't reopen it to reread it.
If either this option or the
-xffile
option is omitted, the missing data will be made up from an
ascending sequence of 1 to
n,
where
n
is the number of points taken from the other file.
At least one file must be specified.
Usually this is the Y-axis file.
If two separate files are read, or two separate columns from one
file, the number of points read for each axis must be equal to
that of the other axis.
- -xlskip or -ylskip
-
Specifies the number of non-blank lines to skip at the start of
the X or Y axis data file, before reading in numbers.
By default, none are skipped.
- -xnnlines or -ynnlines
-
Specifies the number of values to read from
the X or Y axis data file.
By default, it continues until end of file is reached.
If this number is specified, and less values are read, you will
get a warning message.
- -xccolno or -yccolno
-
Specifies the column from which numbers will be read in
the X or Y axis data file.
This is column 1 by default.
- -xsscale or -ysscale
-
Specifies a scaling factor by which numbers read in for
the X or Y axis data file will be multiplied.
This factor is 1 by default.
- -xooffset or -yooffset
-
Specifies an offset by which numbers read in for
the X or Y axis data file will be shifted.
This number is added to the data after it is scaled by the
scaling factor.
This offset is 0 by default.
- -xgtickgap or -ygtickgap
-
Specifies the gap between tick marks on
the X or Y axis.
By default, a reasonable tick gap is calculated based on the
Y or Y axis range.
For polar plots, if a tickgap of 1 is given for an axis, and the range for
that axis is 0,1 then the two labels, 0 and 1, will not be shown for that axis.
The labels would just add clutter to a simple unit circle.
- -xrrange or -yrrange
-
Specifies the range of values to be displayed on the X or Y axis.
By default, the axis is automatically scaled to fit the minimum
and maximum values found in the data.
Specifying the scale explicitly gives you more control over the
graph's appearance, and can be used to get a consistent scale
across multiple graphs, if these are to be combined.
In fact, multiple sets of data can be overlaid by concatenating
the HPGL plot files for several graphs, after suppressing the
plotting of axes for all but one graph, using the
-xp0
option.
The
range
is given as
min,max
within the same argument (i.e. no spaces).
- -xhlabel or -yhlabel
-
Specifies the label which will be placed below
the X axis or to the left of the Y axis.
By default, it will use the file name.
These are not placed on polar graphs.
- -xppen
-
Specifies the plotter pen number to be used for plotting the axes and
labels.
This must be a valid HPGL pen number (1-8), or
0
to suppress plotting.
Pen 1 is used by default.
- -yppen
-
Specifies the plotter pen number to be used for plotting the data
points and connecting lines, if any.
Pen 1 is used by default.
- -ytltype
-
Specifies the plotter line type to be used for plotting the lines
connecting data points.
Valid line types are
0,
for solid lines,
1,
for dotted lines,
2,
for dashed lines,
3,
for long-dashed lines,
4,
for dashed/dotted lines,
5,
for alternatingly long and short dashed lines,
6,
for long/short/short-dashed lines,
or a hyphen
(-),
to suppress connecting lines.
These correspond to the line types available in the
layout(1)
program.
Solid lines are used by default.
- -ymmarker
-
Specifies the marker symbol to be used for plotting the data points.
The symbol can be selected by using one of these characters for
the
marker:
-
-
. A solid (filled) circle.
o A circle outline (not filled).
b A solid square block.
s A square outline.
t A triangle outline.
d A diamond outline (square rotated 45 degrees).
x An X-shaped cross.
-
By default, the diamond symbol is used.
You can also have a character label placed at each data point,
centered vertically and horizontally,
instead of one of these symbols, by specifying a hyphen as the
marker
and following it with the character or string of characters you
want as the marker label.
E.g.
-ym-+,
to get a
+
sign at each data point.
This option is especially useful if the graph is to be edited in the
layout
program.
The tag characters in the
graph can be changed to use any character in the "+special" or
"+symbol" font.
- -ywwidth
-
Specifies the width of the marker symbols, in millimetres.
They are 2 mm by default.
A width of
0
causes the markers to be suppressed.
- -c[probabilities]
-
Specifies that circular statistics should be calculated and plotted.
The mean angle,
a,
and the concentration of points,
r,
are shown, and a line of radius
r
is drawn at the angle
a.
This is intended for use with polar plots.
If the
probabilities
are given, the Rayleigh's critical value for
r
is calculated and shown, plotted as a dotted line at each probability level.
If more than one probability is given, they should be separated by commas
within the same argument (i.e. no spaces).
- -f[separator]
-
Specifies that data in the data files have fixed field separators,
and are not free-format.
If a
separator
is given, this will be the only field separator allowed in the files.
If omitted, any single one of the following will be allowed as a separator:
tab, comma, colon, semi-colon, or parentheses.
Only one separator will be allowed between each column, so if two
separators appear in a row with no number in between for the column you
selected, the data value is assumed to be missing and the line is skipped.
- -u
-
Specifies unlimited plotting.
This will disable clipping of data points that are outside the
range specified by the
-xr
or
-yr
option.
- -p
-
Specifies that a polar plot should be generated, rather than a
conventional Cartesian X-Y plot, to show data of a cyclical nature.
The X coordinate determines the angle where a point is drawn, and
the Y coordinate determines the radial distance of the point from
the centre of the graph.
This works best if the Y axis is explicitly scaled, with a
minimum value of 0.
It is also a good idea to scale the X axis in degrees, from 0 to 360.
- -A, -B, -A3 or -A4
-
By default, the output graphics are set up for an HP plotter with
A-size
(8.5×11´´)
paper.
These page size options,
adjust the coordinate system and aspect ratio to correspond to
the plotter's defaults for that page size.
The default page size can also be changed by setting the
environment variable
HPGLPAGE
to one of the above page sizes.
Prompts
The
makeplot
program will prompt for most of the options it needs.
For each question, the default answer is shown in brackets.
If you just hit RETURN, this value is used.
Otherwise, you can enter the value you want, and hit RETURN.
You are asked for the Y axis file name.
If you give one, you are also asked for the number of points
(or lines) to skip in this file, the number of points to read,
and the column number.
The same thing is repeated for the X axis.
Next, you are asked if you want a polar graph,
and if you want axes plotted.
If you want axes, you are asked for the pen number for axes.
Then, you are asked for the pen number for the plotted data.
You are then given a menu of line types available (including
an entry for no lines), and are asked to pick one.
Similarly, you must pick the symbol type from a menu.
If you pick a character symbol type, you are asked for the
character or characters to use.
Unless you specify no symbols, you are also asked for the symbol
width.
You are then asked for the Y axis data range, followed by the X
axis data range, for purposes of scaling the graph.
Automatic scaling is the default.
Finally, you are asked for the HPGL output file name.
Makeplot
then generates the graph, and on an X terminal, starts up
xhpgl
to display it.
EXAMPLES
- genplot -xftfdata.csv -xc1 -yftfdata.csv -yc2 -xp1 -yp2 -xhTime (ms) -yhFreq (Hz) -yr0,100 | xhpgl
-
Plot of X & Y axis data read as columns 1 & 2, respectively,
from the same file, with axis labels and Y-axis range specified,
and different pens used for axes and data.
Output is viewed on-screen directly using
xhpgl
command, rather than saving to a file.
- crosscorr -l150 apj402-56.csv | genplot -yf- -yc2 -yw0 > apj-cc56.plt
-
Plot of cross-correlation as a line graph, with Y-axis data piped in,
and X-axis data as a linear sequence.
Output is redirected to a
.plt
file.
SEE ALSO
joinnum(1), emuhpgl(1), hardcopy(1), layout(1)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- Options
-
- Prompts
-
- EXAMPLES
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 17:58:04 GMT, February 20, 2019
Copyright © G. R. Detillieux,
Spinal Cord Research Centre,
The University of Manitoba.