title: rectbin author: Daniel Jones part: Geometry order: 1009 ...
Draw colored rectangles.
- color
Either
- x_min
- x_max
- y_min
- y_max
Or
- x
- y
In the former case, an rectangles defined by x_min
, x_max
, y_min
, y_max
are drawn, in the latter, equal sizes sequares are centered at x
and y
positions.
Geom.histogram2d
using RDatasets
using Gadfly
Gadfly.prepare_display()
Gadfly.set_default_plot_size(14cm, 8cm)
plot(dataset("Zelig", "macro"), x="Year", y="Country", color="GDP", Geom.rectbin)