Adding horizontal / vertical lines *between* facets in a facet_grid

I'm trying to recreate a plot like this in ggplot2.

I've successfully used geom_tile and facet_grid to get almost exactly what I want, but I can't find a way to add the horizontal and vertical rules between certain facet row/columns.

Any ideas?

I was able to achieve the desired result using cowplot::draw_line() but this required manual trial and error to get the x and y co-ordinates right, so I'd still be interested in a native ggplot solution!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.