Linked display of multiple ggplot objects
1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
library(ggplot2)
gglinked(
iris,
ggplot(, aes(Sepal.Length, Sepal.Width)) + geom_point(aes(color = selected_)),
ggplot(, aes(Petal.Length, Petal.Width)) + geom_point(aes(color = selected_)),
ggplot(, aes(Species)) + geom_bar(stat = "count", aes(fill = selected_)),
ggplot(, aes(Species)) + geom_bar(stat = "count", aes(fill = selected_))
)
gglinked(
mpg,
ggplot(, aes(cyl, cty)) + geom_point(aes(color = selected_)),
ggplot(, aes(displ, cty)) + geom_point(aes(color = selected_))
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.