ggally_autopoint | R Documentation |
Make scatterplots compatible with both continuous and categorical variables
using geom_autopoint
from package ggforce.
ggally_autopoint(data, mapping, ...)
ggally_autopointDiag(data, mapping, ...)
data |
data set using |
mapping |
aesthetics being used |
... |
other arguments passed to |
Joseph Larmarange
# Small function to display plots only if it's interactive
p_ <- GGally::print_if_interactive
data(tips)
p_(ggally_autopoint(tips, mapping = aes(x = tip, y = total_bill)))
p_(ggally_autopoint(tips, mapping = aes(x = tip, y = sex)))
p_(ggally_autopoint(tips, mapping = aes(x = smoker, y = sex)))
p_(ggally_autopoint(tips, mapping = aes(x = smoker, y = sex, color = day)))
p_(ggally_autopoint(tips, mapping = aes(x = smoker, y = sex), size = 8))
p_(ggally_autopoint(tips, mapping = aes(x = smoker, y = sex), alpha = .9))
p_(ggpairs(
tips,
mapping = aes(colour = sex),
upper = list(discrete = "autopoint", combo = "autopoint", continuous = "autopoint"),
diag = list(discrete = "autopointDiag", continuous = "autopointDiag")
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.