as.ggedit {ggedit}R Documentation

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)

Arguments

plot

an object

Value

an object of class ggedit

See Also

print.ggedit, ggplot

Examples


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

[Package ggedit version 0.4.1 Index]