Draw bar plots. This geometry works on pre-summarized data such as counts. To draw histograms from a series of observations, add Stat.histogram to the plot, or use the convenient geometry Geom.histogram.
y: Height of each bar.
color(optional): Group categorically by color.
x: Position of each bar.
xmin: Starting x positions for each bar.
xmax: End x positions for each bar.
x is given, a bar will be drawn at each x value, specifying both
xmax allows bars of variable width to be drawn.
:dodge. If the
coloraesthetic is bound this determines how bars of different colors should be arranged: stacked on top of each other, or placed side by side.
:horizontal, then the required aesthetics are
plot(dataset("HistData", "ChestSizes"), x="Chest", y="Count", Geom.bar)