Description Usage Arguments Value Examples
gg_remove_background
removes the background from the given plot. This
is useful for creating plots with transparent backgrounds
gg_remove_background_canvas
Removes TODO
gg_remove_background_panel
Removes TODO
gg_remove_background_legend
Removes TODO
gg_remove_background_facet
Removes TODO
1 2 3 4 5 6 7 8 9 10 | gg_remove_background(plot = last_plot(), canvas = TRUE, panel = FALSE,
legend = FALSE, facet = FALSE)
gg_remove_background_canvas(plot = last_plot())
gg_remove_background_panel(plot = last_plot())
gg_remove_background_legend(plot = last_plot())
gg_remove_background_facet(plot = last_plot())
|
plot |
A ggplot2 plot object. By default, the last plot displayed is used. |
canvas |
Whether or not to remove the background from the entire image (default: |
panel |
Whether or not to remove the background from the panel (i.e., the plotting area; default: |
legend |
Whether or not to remove the legend's background
(default: |
facet |
Whether or not to remove the background from facet labels
(default: |
A modified ggplot2 plot
1 2 3 | p <- ggplot(mtcars, aes(x = cyl, y = mpg)) +
geom_point(shape = 1)
gg_remove_background(plot = p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.