Add a bin figure to the chart.
fig_bin( g, ..., type = c("rectangle", "hexagon"), bins = c(10, 10), size_count = TRUE, sync = TRUE, data = NULL, inherit_asp = TRUE, alias = "count" )
g | An object of class |
---|---|
... | Options to pass to the figure, including |
type | The shape of bin to create. |
bins | Number of bins by dimension (width, height). |
size_count | Whether to size the binds by count. |
sync | Whether to sync the axis data (align) with that
used in other figures, set to |
data | A dataset ( |
inherit_asp | Whether to inherit the aspects paseed to
|
alias | Name of the range to display on tooltips, labels, etc. |
Requires the x
and y
aspects.
g2(cars, asp(speed, dist)) %>% fig_bin(size_count = FALSE) g2(cars, asp(speed, dist)) %>% fig_bin(type = "hexagon")