as.ggedit | R Documentation |
Applied to ggplot objects to use the ploting function of ggedit.
as.ggedit(plot)
plot |
an object |
an object of class ggedit
print.ggedit
, ggplot
p <- ggplot2::ggplot(iris,ggplot2::aes(x =Sepal.Length,y=Sepal.Width))
p1 <- p +
ggplot2::geom_point(ggplot2::aes(colour=Species)) +
ggplot2::geom_line()
p2 <- p +
ggplot2::geom_point() +
ggplot2::geom_smooth(method='loess')
p3 <- list(p1,p2)
p4 <- as.ggedit(p3)
p4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.