You need scale_fill_grey()
colour = colour of the border of the polygons
fill = colour of the face of the polygons
Best regards,
Thierry
> -----Oorspronkelijk bericht-----
> Van: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com]
> Namens wooster
> Verzonden: dinsdag 2 augustus 2011 12:58
> Aan: ggplot2
> Onderwerp: geom_bin2d heatmap grayscale
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
The problem I got when I tried this suggestion was
ggplot(heat, aes(length, rank)) + stat_bin2d() +
opts(legend.position="none") + scale_fill_grey()
Error: Continuous variable () supplied to discrete scale_grey.
As a result, I decided to try scale_fill_gradient() with grayscale
colors for low and high:
ggplot(heat, aes(length, rank)) + stat_bin2d() +
scale_fill_gradient(limits = c(1, 10), low = 'gray80', high = 'gray20')
One can certainly toy with the values to get something better, but
this should give an idea...
HTH,
Dennis