Description Usage Arguments Examples
Scale stacked values.
1 | geometry_scale(geom, dir = c("y", "x"), max = 1)
|
geom |
A geometry data frame. |
dir |
Direction in which to stack. "x" or "y" for rects, only "y" for smooths, "r" or "theta" for arcs. |
max |
Maximum value to scale to. Defaults to 1, except when scaling "theta", where it defaults to 2 * pi. |
1 2 3 4 5 6 7 8 9 | bar_ex %>% geometry_stack() %>% plot()
bar_ex %>% geometry_stack() %>% geometry_scale() %>% plot()
pies <- render_arc(mtcars, ~vs, ~am, 0, 0.1, 0, ~mpg / max(mpg) * 2 / pi)
pies %>% geometry_stack() %>% plot()
pies %>% geometry_stack() %>% geometry_scale() %>% plot()
disks <- render_arc(mtcars, ~vs, ~am, 0, 0.05, 0, 2 * pi)
disks %>% geometry_stack("r") %>% geometry_scale("r", 0.45) %>% plot()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.