scale_mag | R Documentation |
Allows to control the size of the arrows in geom_arrow. Highly experimental.
scale_mag(
name = ggplot2::waiver(),
n.breaks = 1,
breaks = ggplot2::waiver(),
oob = no_censor,
...
)
scale_mag_continuous(
name = ggplot2::waiver(),
n.breaks = 1,
breaks = ggplot2::waiver(),
oob = no_censor,
...
)
name |
The name of the scale. Used as the axis or legend title. If
|
n.breaks |
An integer guiding the number of major breaks. The algorithm
may choose a slightly different number to ensure nice break labels. Will
only have an effect if |
breaks |
One of:
|
oob |
One of:
|
... |
Other arguments passed on to |
library(ggplot2)
g <- ggplot(seals, aes(long, lat)) +
geom_vector(aes(dx = delta_long, dy = delta_lat), skip = 2)
g + scale_mag("Seals velocity")
g + scale_mag("Seals velocity", limits = c(0, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.