This function tests whether an object is a ggplot2 plot object or a gtable (grid table) object.
Examples
if (FALSE) { # \dontrun{
library(ggplot2)
p <- ggplot(mtcars, aes(x = mpg, y = hp)) + geom_point()
is.gg(p) # TRUE
is.gg(mtcars) # FALSE
} # }
This function tests whether an object is a ggplot2 plot object or a gtable (grid table) object.
if (FALSE) { # \dontrun{
library(ggplot2)
p <- ggplot(mtcars, aes(x = mpg, y = hp)) + geom_point()
is.gg(p) # TRUE
is.gg(mtcars) # FALSE
} # }