On 26 February 2010 11:12, Lorenzo Isella <lorenzo.ise...@gmail.com> wrote:

> Thanks Augustine and Jim for the prompt reply.
> You both answered my question. To avoid another post, I would simply like to
> know if something along these lines is doable also with ggplot2.
> Many thanks
>
> Lorenzo
>

Augustine???

Anyhow, with ggplot2,

m <- matrix(rnorm(200) > 0,  ncol=20)

require(ggplot2)

d <- melt(m)
qplot(X1, X2, data=d, fill=value, geom="tile") +
  scale_fill_manual(values=c("white", "black"))

HTH,

baptiste

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to