Is there any way in ggplot2 to draw a continuous baseline across multiple facets? The closest I have found is to add a
geom_hline to the plot. I would like the horizontal line to be continuous across all transmission types below.
library(ggplot2) ggplot(mpg, aes(class, fill=class)) + geom_hline(yintercept=0) + geom_bar() + facet_grid(cyl~trans, switch='x') + theme_minimal() + theme(axis.ticks=element_blank(), axis.text.x=element_blank(), panel.grid=element_blank()) + labs(x='')
Created on 2018-10-05 by the reprex package (v0.2.0).