yutannihilation / gghighlight

Highlight points and lines in ggplot2

Home Page:https://yutannihilation.github.io/gghighlight/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

highlighting facet panels

csenguler opened this issue · comments

Hello Hiroaki,

i was wondering if there is a possibility to highlight an entire panel within a facet_wrap and/or facet_grid. Let's assume the simple example below:

library(ggplot2) p <- ggplot(mpg, aes(displ, cty)) + geom_point() p + facet_grid(drv ~ cyl)

Now, let's say I want to grey out some of the panels based on specific variables and conditions, and leave the remaining panels as they are. Is this possible with gghighlight?

Hmm, probably you cannot... I guess what you want is something like "highlighting the panels whose average value of displ is more than 20," right? It's not possible with gghighlight (at least at the moment).