remove_geom: Remove a geom layer

View source: R/tidyversetools.R

remove_geomR Documentation

Remove a geom layer

Description

Remove a geom layer

Usage

remove_geom(x, geom_type, last_only = T)

Arguments

x

ggplot object

geom_type

Character such as "GeomLine"

last_only

only the topmost layer of this kind is removed

Details

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

Value

the plot with the layers removed


dlill/conveniencefunctions documentation built on Sept. 30, 2022, 4:40 a.m.