Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 971 Bytes

geom_hexbin.md

File metadata and controls

44 lines (33 loc) · 971 Bytes

title: hexbin author: Daniel Jones part: Geometry order: 1013 ...

Bin data into tiled hexagonal bins and color by count.

Aesthetics

  • x: Observations to be binned and plotted on the x-axis.
  • y: Observations to be binned and plotted on the y-axis.
  • xsize
  • ysize

By default Stat.hexbin is applied which bins x and y observations and colors hexagons according to count. To override this, pass Stat.identity to plot and manually bind the color aesthetic.

Arguments

  • xbincount: Number of bins along the x-axis.
  • ybincount: Number of bins along the y-axis.

Examples

using Gadfly, Distributions

Gadfly.prepare_display()
Gadfly.set_default_plot_size(14cm, 8cm)
X = rand(MultivariateNormal([0.0, 0.0], [1.0 0.5; 0.5 1.0]), 10000)
plot(x=X[1,:], y=X[2,:], Geom.hexbin)
plot(x=X[1,:], y=X[2,:], Geom.hexbin(xbincount=100, ybincount=100))