View source: R/tidyversetools.R
remove_geom | R Documentation |
Remove a geom layer
remove_geom(x, geom_type, last_only = T)
x |
ggplot object |
geom_type |
Character such as "GeomLine" |
last_only |
only the topmost layer of this kind is removed |
This function was mainly written by Pedro Aphalo on https://stackoverflow.com/questions/13407236/remove-a-layer-from-a-ggplot2-chart#51612148 I only added the last_only - argument
the plot with the layers removed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.