Description Usage Arguments Examples
Certain geoms don't play nice with certain aesthetics, so the aesthetics are modified to be more meaningful with that geom. See 'Examples'.
1 | update_aes(class, aes, geom)
|
class |
The named vector with classes of the aesthetics. |
aes |
The currentaesthetics itself. |
geom |
The current geom. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library("ggplot2")
p <- ggplot(mtcars)
# nice
p + geom_violin(aes(factor(cyl), mpg))
# nonsense
p + geom_violin(aes(mpg, factor(cyl)))
mtcars %>%
transform_cols("cyl", "as.factor") %>%
vis_2d_distr(c("cyl", "mpg")) %>%
pull_gg()
mtcars %>%
transform_cols("cyl", "as.factor") %>%
vis_2d_distr(c("mpg", "cyl")) %>%
pull_gg()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.