BAR_GRAPH Name
BAR_GRAPH
Purpose
This procedure plots bar graphs.
Category
Graphics
Calling Sequence
BAR_GRAPH, [Xval,] Yval
Inputs
Yval: A vector of values to be plotted, of type integer or
floating point. Optional Inputs
Xval: A vector of ordinate values for the plot, of type integer
or floating point.
Keyword Parameters
BARBORDER: The color of the border of the bars. The default is the
same as BARCOLOR.
BARCOLOR: The color of the bars of the bar plot.
BARGAP: The size of the gap between bars in unit of fraction of the
bar width. The default is 0 (no gap).
CHARSIZE: The size of the text characters.
COLOR: The color of the plot axes and text.
FONT: The index of the font table to be used.
OVERPLOT: If set the procedure plots on top of the exising plot.
SUBTITLE: A subtitle for the plot, of type string.
TITLE: A title, of type string, for the plot.
VARWIDTH: If set the bars are all with variable widths such that
there are no gaps between them. The default is to plot all
bars with the same width.
[X,Y]MINOR: The number of minor tick marks between major tick marks.
[X,Y]RANGE: A 2-element vector containing the minimum and maximum
X- or Y-coordinates to be plotted.
[X,Y]STYLE: See the IDL help for the use of these keywords in plotting
routines.
[X,Y]THICK: The line thickness.
[X,Y]TICKLEN: The length of the ticks on the X- or Y-axis, in units of
fraction of the window size. The default is !p.ticklen (0.02).
[X,Y]TICKNAME: A vector, of type string, of labels for the major ticks
on the X- or Y-axis. There should be [X,Y]TICKS + 1 values in
the vector.
[X,Y]TICKS: The number of major ticks on the X- or Y-axis minus one.
[X,Y]TICKV: The location of the major ticks on the X- or Y-axis.
[X,Y]TITLE: A label for the X or Y axis, of type string.
Uses
FIRST_DIFF.pro
VAR_TYPE.pro
Procedure
This procedure uses the POLYFILL procedure to draw solid bar
graphs.
Example
Plot 10 step-like bars.
bar_graph, indgen(10)+1, barcolor=2, bargap=0.1
Modification History
Written by: Daithi A. Stone (stoned@atm.ox.ac.uk), 2000-09-11.
Modified: DAS, 2001-10-22 (Added [X,Y]TICKLEN keywords).
Modified: DAS, 2003-06-16 (added FONT, [X,Y]MINOR, [X,Y]THICK
keywords)