View source: R/stat_bin_2d_integer.R
stat_bin_2d_integer | R Documentation |
A function to use the StatBin2dInteger statistic
stat_bin_2d_integer(
mapping = NULL,
data = NULL,
geom = "rect",
position = "identity",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
nbins = 30,
...
)
mapping |
The aesthetic mapping, usually constructed with aes or aes_. |
data |
The data to be displayed in the layer. |
geom |
The geometric object to use display the data |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
na.rm |
If FALSE, the default, missing values are removed with a warning. If TRUE, missing values are silently removed. |
show.legend |
logical. Should this layer be included in the legends? |
inherit.aes |
If FALSE, overrides the default aesthetics, rather than combining with them. |
... |
other arguments passed on to layer. |
bins |
number of bins |
ggplot layer
library(ggplot2)
ggplot(mtcars, aes(mpg, disp)) +
stat_bin_2d_integer(aes(fill = after_stat(count)), nbins = 30) +
scale_y_log10()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.