Closed
Description
Hi Teun!
I’ve always wondered about this. Is there a way to update a scale
instead of replacing it, similar to how theme()
works?
If not, would there be a way to implement this?
library(ggplot2)
p <-
mtcars |>
ggplot(aes(disp, drat)) +
geom_point()
# themes are updated
p +
theme(panel.grid.major = element_line(color = "pink")) +
theme(panel.grid.minor = element_line(color = "blue"))
# scales are replaced
p +
scale_x_continuous(limits = c(100, 200)) +
scale_x_continuous(trans = "log10")
Best
Jan
Metadata
Metadata
Assignees
Labels
No labels