On 10/12/07, Bert Gunter <[EMAIL PROTECTED]> wrote: > ?levelplot() is the standard lattice package version of image and > automatically generates a legend. > > Note: if the image is expressed as a matrix, X, of nrow x ncol values, then > (as in image()) then levelplot should be invoked with: > > rowindx <- seq.int(nrow(X)) > levelplot(t(X)[,rev(rowindx)],scales=list(y=list(labels=rev(rowindx),at=rowi > ndx)),xlab="Column", ylab="Row")
Or (I think) library(reshape) levelplot(value ~ X1 * X2, melt(X)) And with ggplot2 library(ggplot2) qplot(X1, X2, fill=value, data=melt(z), geom="tile") Hadley -- http://had.co.nz/ ______________________________________________ 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.