powered by
Replacements for ggplot2::scale_size_area() and ggplot2::scale_size_binned_area() with convenient defaults for geom_hextile().
ggplot2::scale_size_area()
ggplot2::scale_size_binned_area()
geom_hextile()
scale_size_tile( name = ggplot2::waiver(), ..., max_size = 1, oob = scales::squish )scale_size_binned_tile( name = ggplot2::waiver(), ..., max_size = 1, oob = scales::squish )
scale_size_binned_tile( name = ggplot2::waiver(), ..., max_size = 1, oob = scales::squish )
A ggplot2::Scale.
ggplot2::Scale
The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.
waiver()
NULL
Arguments passed on to ggplot2::continuous_scale() or ggplot2::binned_scale().
ggplot2::continuous_scale()
ggplot2::binned_scale()
Size of largest points.
One of:
Function that handles limits outside of the scale limits (out of bounds). Also accepts rlang lambda function notation.
The default (scales::squish()) squishes out of bounds values into range.
scales::squish()
scales::censor() for replacing out of bounds values with NA.
scales::censor()
NA
scales::squish_infinite() for squishing infinite values into range.
scales::squish_infinite()
These are convenience functions with the following changed defaults:
max_size = 1 rather than 6,
max_size = 1
6
oob = scales::squish.
oob = scales::squish
In practice, this makes it easy to set a hard upper limit on a scale, above which sizes are clamped to 1.
library(ggplot2) d <- ggplot(diamonds, aes(carat, depth, z = price)) + geom_hextile() d + scale_size_tile(limits = c(NA, 100)) d + scale_size_binned_tile(transform = "log10")
Run the code above in your browser using DataLab