tags:

views:

183

answers:

2

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.

Thanks for thoughts!

Robert

+3  A: 

It's not currently possible because grid (the graphics system that ggplot2 uses to do the actual drawing) doesn't support textures. Sorry!

hadley
Thanks, Hadley. I love ggplot2 (and plyr) and I am very thankful that you created them. Robert
rhh
+2  A: 

ggplot can user colorbrewery palettes. Some of theese 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.

Andreas