scale_size_tile {gghexsize} | R Documentation |
Scales for area or radius of bin tiles
Description
Replacements for ggplot2::scale_size_area()
and
ggplot2::scale_size_binned_area()
with convenient defaults for
geom_hextile()
.
Usage
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
)
Arguments
name |
The name of the scale. Used as the axis or legend title. If
|
... |
Arguments passed on to |
max_size |
Size of largest points. |
oob |
One of:
|
Details
These are convenience functions with the following changed defaults:
-
max_size = 1
rather than6
, -
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.
Value
Examples
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")