BAR2D Procedure

Creates a 2D bar graph.

Usage

    BAR2D, [x, ] y

Input Parameters

x—(optional) Specifies a 1D array of x values. (Default: the index number in the y array)

y—Specifies a 1D array of y values.

Keywords

ColumnColors—An array of color indices specifying the colors to use for the column bars.

Outline—If nonzero, each bar is outlined. (Default: no outlining)

Additional BAR2D keywords are listed below. For a description of each keyword, see Graphics and Plotting Keywords.

Background Normal [XY]Minor
Charsize Position [XY]Range
Charthick Subtitle [XY]Style
Color Thick [XY]Ticklen
Data Ticklen [XY]Tickname
Device Title [XY]Ticks
Font [XY]Charsize [XY]Title
Gridstyle [XY]Gridstyle YLabelCenter
Linestyle [XY]Margin  

Discussion

This procedure creates a simple bar chart. To create more complex bar charts that include grouped and stacked bars, legends, and pattern-filled bars, see the BAR procedure.

Examples

This example creates a simple bar chart, shown in 2D Bar Chart

y = FINDGEN(5)
TEK_COLOR
BAR2D, y, Title= 'Buffalo Securities Demo', Xtitle = 'X Axis', $
   Ytitle = 'Y Axis'

2D Bar Chart