How to add texture to fill colors in ggplot2
ggplot2, r
Solution
ggplot can use colorbrewer palettes. Some of these are "photocopy" friendly. So mabe something like this will work for you?
ggplot(diamonds, aes(x=cut, y=price, group=cut))+
geom_boxplot(aes(fill=cut))+scale_fill_brewer(palette="OrRd")
in this case OrRd is a palette found on the colorbrewer webpage: http://colorbrewer2.org/
Photocopy Friendly: This indicates that a given color scheme will withstand black and white photocopying. Diverging schemes can not be photocopied successfully. Differences in lightness should be preserved with sequential schemes.
Problem
I'm currently using `scale_brewer()` for fill and these look beautiful in color (on screen and via color printer) but print relatively uniformly as greys when using a black and white printer. I searched the online `ggplot2` documentation but didn't see anything about adding textures to fill colors. Is there an official `ggplot2` way to do this or does anyone have a hack that they use? By textures I mean things like diagonal bars, reverse diagonal bars, dot patterns, etc that would differentiate fill colors when printed in black and white.