Closed yutannihilation closed 1 month ago
devtools::load_all("~/GitHub/gghighlight/")
#> ℹ Loading gghighlight
#> Loading required package: ggplot2
p1 <- ggplot(mtcars, aes(wt, mpg)) +
geom_point(size = 10) +
theme(geom = element_geom(ink = "purple")) +
gghighlight(mpg < 25)
do_plot <- function(ink = "black", paper = "white") {
p <- ggplot(mtcars, aes(wt, mpg)) +
geom_point(size = 10) +
theme(
geom = element_geom(ink = ink, paper = paper),
plot.background = element_rect(fill = paper),
panel.background = element_rect(fill = paper)
) +
gghighlight(mpg < 25)
}
p2 <- do_plot()
p3 <- do_plot("purple")
p4 <- do_plot("white", "black")
p5 <- do_plot("white", "red")
p6 <- do_plot("blue", "red")
patchwork::wrap_plots(p1, p2, p3, p4, p5, p6)
Created on 2024-09-07 with reprex v2.1.1
While the bottom middle case looks not very nice, I think this is suffice for now.
Created on 2024-09-06 with reprex v2.1.1