Learn R Programming

ggedit (version 0.4.1)

as.ggedit: Try to coerce a ggplot object into a ggedit object

Description

Applied to ggplot objects to use the ploting function of ggedit.

Usage

as.ggedit(plot)

Value

an object of class ggedit

Arguments

plot

an object

See Also

print.ggedit, ggplot

Examples

Run this code

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

Run the code above in your browser using DataLab