Next Previous Up Contents
Next: Examples
Up: plothist: Histogram
Previous: plothist: Histogram
The usage of plothist
is
stilts <stilts-flags> plothist xpix=<int-value> ypix=<int-value>
font=dialog|serif|... fontsize=<int-value>
fontstyle=plain|bold|italic|bold-italic
legend=true|false title=<value>
omode=swing|out|cgi|discard|auto
out=<out-file>
ofmt=png|gif|jpeg|pdf|eps|eps-gzip
inN=<table> ifmtN=<in-format>
istreamN=true|false cmdN=<cmds>
xdataN=<expr> xlo=<float-value>
xhi=<float-value> xlog=true|false
xflip=true|false xlabel=<value>
subsetNS=<expr> nameNS=<value>
colourNS=<rrggbb>|red|blue|...
barstyleNS=fill|open|...
linewidthNS=<int-value>
dashNS=dot|dash|...|<a,b,...>
grid=true|false antialias=true|false
sequence=<suffix>,<suffix>,...
ylo=<float-value> yhi=<float-value>
ylog=true|false ylabel=<value>
weightN=<value> binwidth=<float-value>
norm=true|false cumulative=true|false
binbase=<float-value>
If you don't have the stilts
script installed,
write "java -jar stilts.jar
" instead of
"stilts
" - see Section 3.
The available <stilts-flags>
are listed
in Section 2.1.
Parameter values are assigned on the command line
as explained in Section 2.3.
They are as follows:
-
antialias = true|false
- Controls whether lines are drawn using antialiasing,
where applicable.
If lines are drawn to a bitmapped-type graphics output format
setting this parameter to true smooths the lines out by
using gradations of colour for diagonal lines, and setting it
false simply sets each pixel in the line to on or off.
For vector-type graphics output formats, or for cases in which
no diagonal lines are drawn, the setting of this parameter
has no effect.
Setting it true may slow the plot down slightly.
[Default: true
]
-
barstyleNS = fill|open|...
- Defines how histogram bars will be drawn for dataset
NS.
The options are:
-
fill
-
open
-
tops
-
spikes
-
fillover
-
openover
[Default: fill
]
-
binbase = <float-value>
- Adjusts the offset of the bins.
By default zero (or one for logarithmic X axis)
is a boundary between bins;
other boundaries are defined by this and the bin width.
If this value is adjusted, the lower bound of one of the bins
will be set to this value, so all the bins move along by the
corresponding distance.
[Default: 0
]
-
binwidth = <float-value>
- Defines the width on the X axis of histogram bins.
If the X axis is logarithmic, then this is a multiplicative
value.
-
cmdN = <cmds>
- The value of this parameter is one or more of the filter
commands described in Section 6.1.
If more than one is given, they must be separated by
semicolon characters (";").
This parameter can be repeated multiple times on the same
command line to build up a list of processing steps.
The sequence of commands given in this way
defines the processing pipeline which is performed on the table.
Commands may alteratively be supplied in an external file,
by using the indirection character '@'.
Thus "cmdN=@filename
"
causes the file filename
to be read for a list
of filter commands to execute. The commands in the file
may be separated by newline characters and/or semicolons.
-
colourNS = <rrggbb>|red|blue|...
- Defines the colour of bars plotted for data set
NS.
The value may be a 6-digit hexadecimal number giving
red, green and blue intensities,
e.g. "
ff00ff
" for magenta.
Alternatively it may be the name of one of the
pre-defined colours.
These are currently
red, blue, green, grey, magenta, cyan, orange, pink, yellow, black and white.
For most purposes, either the American or the British spelling
is accepted for this parameter name.
-
cumulative = true|false
- Determines whether historams are cumulative.
When false (the default), the height of each bar is determined
by counting the number of points which fall into the range
on the X axis that it covers.
When true, the height is determined by counting all the points
between negative infinity and the upper bound of the range
on the X axis that it covers.
[Default: false
]
-
dashNS = dot|dash|...|<a,b,...>
- Defines the dashing pattern for lines drawn for dataset
NS.
To generate a dashed line the value may be
one of the named dash types:
-
dot
-
dash
-
longdash
-
dotdash
or may be a comma-separated string of on/off length values such as
"4,2,8,2
".
A null
value indicates a solid line.
Only certain bar styles are affected by the dash pattern.
-
font = dialog|serif|...
- Determines the font that will be used for textual annotation
of the plot, including axes etc.
The available names are:
-
default
-
dialog
-
dialoginput
-
lucida_bright
-
lucida_sans
-
lucida_sans_typewriter
-
monospaced
-
sansserif
-
serif
[Default: dialog
]
-
fontsize = <int-value>
- Sets the font size used for plot annotations.
[Default: 12
]
-
fontstyle = plain|bold|italic|bold-italic
- Gives a style in which the font is to be applied for
plot annotations.
Options are
plain
,
bold
,
italic
and
bold-italic
.
[Default: plain
]
-
grid = true|false
- If true, grid lines are drawn on the plot.
If false, they are absent.
[Default: true
]
-
ifmtN = <in-format>
- Specifies the format of the input table
(one of the known formats listed in Section 5.2.1).
This flag can be used if you know what format your input
table is in.
If it has the special value
(auto)
(the default),
then an attempt will be
made to detect the format of the table automatically.
This cannot always be done correctly however, in which case
the program will exit with an error explaining which
formats were attempted.
[Default: (auto)
]
-
inN = <table>
- The location of the input table.
This is usually a filename or URL, and may point to a file
compressed in one of the supported compression formats
(Unix compress, gzip or bzip2).
If it is omitted, or equal to the special value "-",
the input table will be read from standard input.
In this case the input format must be given explicitly
using the
ifmtN
parameter.
-
istreamN = true|false
- If set true, the
inN
table
will be read as a stream.
It is necessary to give the
ifmtN
parameter
in this case.
Depending on the required operations and processing mode,
this may cause the read to fail (sometimes it is necessary
to read the input table more than once).
It is not normally necessary to set this flag;
in most cases the data will be streamed automatically
if that is the best thing to do.
However it can sometimes result in less resource usage when
processing large files in certain formats (such as VOTable).
[Default: false
]
-
legend = true|false
- Determines whether a legend showing which plotting style is
used for each data set.
Defaults to true if there is more than one set, false otherwise.
-
linewidthNS = <int-value>
- Defines the line width for lines drawn as part of the bars
for dataset NS.
Only certain bar styles are affected by the line width.
[Default: 2
]
-
nameNS = <value>
- Provides a name to use for a subset with the symbolic label
NS.
This name will be used for display in the legend,
if one is displayed.
-
norm = true|false
- Determines whether bin counts are normalised.
If true, histogram bars are scaled such that
summed height of all bars over the whole dataset is equal to one.
Otherwise (the default), no scaling is done.
[Default: false
]
-
ofmt = png|gif|jpeg|pdf|eps|eps-gzip
- Graphics format in which the plot is written to
the output file.
One of:
-
png
: image/png format
-
gif
: image/gif format
-
jpeg
: image/jpeg format
-
pdf
: application/pdf format
-
eps
: application/postscript format
-
eps-gzip
: application/postscript (gzip) format
May default to a sensible value depending on the
filename given by out
.
-
omode = swing|out|cgi|discard|auto
- Determines how the drawn plot will be output.
-
swing
:
Plot will be displayed in a window on the screen.
-
out
:
Plot will be written to a file given by out
using the graphics format given by ofmt
.
-
cgi
:
Plot will be written in a way suitable for CGI use direct from a web server.
The output is in the graphics format given by ofmt
,
preceded by a suitable "Content-type" declaration.
-
discard
:
Plot is drawn, but discarded. There is no output.
-
auto
:
Behaves as swing
or out
mode depending on presence of out
parameter
[Default: auto
]
-
out = <out-file>
- The location of the output file. This is usually a filename
to write to.
If it is equal to the special value "-"
the output will be written to standard output.
-
sequence = <suffix>,<suffix>,...
- Can be used to control the sequence in which different
datasets and subsets are plotted.
This will affect which symbols are plotted on top of,
and so potentially obscure,
which other ones.
The value of this parameter is a comma-separated list of the
"
NS
"
suffixes which appear on the
parameters which apply to subsets.
The sets which are named
will be plotted in order, so the first-named one will be
at the bottom (most likely to be obscured).
Note that if this parameter is supplied, then only those sets
which are named will be plotted,
so this parameter may also be used to restrict which plots appear
(though it may not be the most efficient way of doing this).
If no explicit value is supplied for this parameter,
sets will be plotted in some sequence decided by STILTS
(probably alphabetic by suffix).
-
subsetNS = <expr>
- Gives the selection criterion for the subset labelled
"
NS
".
This is a boolean expression which may be the name of
a boolean-valued column or any other boolean-valued expression.
Rows for which the expression evaluates true will be included
in the subset, and those for which it evaluates false will not.
-
title = <value>
- A one-line title to display at the top of the plot.
-
weightN = <value>
- Defines a weighting for each point accumulated to determine
the height of plotted bars.
If this parameter has a value other than 1 (the default)
then instead of simply accumulating the number of points per bin
to determine bar height,
the bar height will be the sum over the weighting expression
for the points in each bin.
Note that with weighting, the figure drawn is no longer
strictly speaking a histogram.
When weighted, bars can be of negative height.
An anomaly of the plot as currently implemented is that the
Y axis never descends below zero, so any such bars are currently
invisible.
This may be amended in a future release
(contact the author to lobby for such an amendment).
[Default: 1
]
-
xdataN = <expr>
- Gives a column name or expression for the x
axis data for table N.
The expression is a numeric algebraic expression
based on column names
as described in Section 9
-
xflip = true|false
- If set true, the scale on the x axis
will increase in the opposite sense from usual
(e.g. right to left rather than left to right).
[Default: false
]
-
xhi = <float-value>
- The upper limit for the plotted x axis.
If not set, a value will be chosen which is high enough
to accommodate all the data.
-
xlabel = <value>
- Specifies a label to be used for annotating axis x.
A default values based on the plotted data will be used
if no value is supplied for this parameter.
-
xlo = <float-value>
- The lower limit for the plotted x axis.
If not set, a value will be chosen which is low enough
to accommodate all the data.
-
xlog = true|false
- If false (the default), the scale on the x
axis is linear; if true it is logarithmic.
[Default: false
]
-
xpix = <int-value>
- The width of the output graphic in pixels.
[Default: 400
]
-
yhi = <float-value>
- Upper bound for Y axis.
Autogenerated from the data if not supplied.
-
ylabel = <value>
- Specifies a label for annotating the vertical axis.
A default value based on the type of histogram will be used
if no value is supplied for this parameter.
[Default: Count
]
-
ylo = <float-value>
- Lower bound for Y axis.
[Default: 0
]
-
ylog = true|false
- Whether to use a logarithmic scale for the Y axis.
[Default: false
]
-
ypix = <int-value>
- The height of the output graphic in pixels.
[Default: 300
]
Next Previous Up Contents
Next: Examples
Up: plothist: Histogram
Previous: plothist: Histogram
STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page:
http://www.starlink.ac.uk/stilts/
Author email:
m.b.taylor@bristol.ac.uk