Extract guides to hide from a ggplot.
legends2hide(p)
p
NULL if no legends with colour or fill to hide.
Toby Dylan Hocking