This demo may take a moment to load. Place your mouse over points to view their tooltips. Click any plot to activate its download popover.
library(svgg) library(ggplot2) library(gridExtra)
renderSVGG({ p <- ggplot(diamonds, aes(cut, carat, outlier.labels=I(color), group=cut)) + geom_boxplot() }, popover=list(title='simple_boxplot'))
renderSVGG({ p <- ggplot(diamonds, aes(cut, carat, fill=color, outlier.labels=I(carat), group=interaction(cut, color))) + geom_boxplot() }, popover=list(title='complex_boxplot'))
renderSVGG({ p <- ggplot(mtcars, aes(wt, mpg)) + geom_point() }, popover=list('scatter_plot_default_labels'))
renderSVGG({ p <- ggplot(mtcars, aes(wt, mpg, point.labels=cyl)) + geom_point() }, popover=list('scatter_plot_custom_labels'))
renderSVGG({ set.seed(100) n <- 50 d <- data.frame(x=seq(n), y=rnorm(n)) ggplot(d, aes(x, y)) + geom_line() + geom_point(alpha=0, size=4, color='red', onmouseover='set_alpha(this, 1)', onmouseout='set_alpha(this, 0)' ) }, popover=list(title='line_plot'))
renderSVGG({ p1 <- ggplot(mtcars, aes(wt, mpg)) + geom_point() p2 <- ggplot(diamonds, aes(cut, carat, outlier.labels=I(color), group=cut)) + geom_boxplot() arrangeGrob(p1, p2, nrow=1) }, popover=list(title='arrangeGrob'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.