ggstatsplot (version 0.0.11)

ggplot_converter: Transform object of any other class to an object of class ggplot.

Description

Transform object of any other class to an object of class ggplot.

Usage

ggplot_converter(plot)

Arguments

plot

A plot that needs to be converted to object of class ggplot.

Examples

Run this code
# NOT RUN {
library(ggplot2)

# creating a plot that is not of class `ggplot`
p <- ggExtra::ggMarginal(ggplot(mtcars, aes(wt, mpg)) + geom_point())

# checking class of object
class(p)

# checking class of converted plot
p_converted <- ggstatsplot::ggplot_converter(p)
class(p_converted)
# }

Run the code above in your browser using DataCamp Workspace