Rajarshi Guha <[EMAIL PROTECTED]> writes:

> Hi, I have some data which I was plotting using image(). I wanted to
> add a vertical color key to the plot and I found that heatmap.2 in
> gplots does let me add a color key. However, I was thinking of a
> vertical bar with the color range rather than  the style that gplots
> provides.

In package 'spatstat' this is the default behaviour for plotting a pixel
image (object of class "im").
If M is your matrix of data

         library(spatstat)
         Z <- as.im(t(M))
         plot(Z)
         plot(Z, col=topo.colors(128))

______________________________________________
R-help@stat.math.ethz.ch 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