[R] Flip axis on hist2d plot

Ralf B ralf.bierig at gmail.com
Fri Jul 30 12:55:41 CEST 2010


I am plotting a heatmap using the hist2d function:

require("gplots")
x <- rnorm(2000)
y <- rnorm(2000)
hist2d(x, y, freq=TRUE, nbins=50, col = c("white",heat.colors(256)))

However, I would like to flip the vertical y axis so that the upper
left corner serves as the y-origin. How can I do that?

Ralf



More information about the R-help mailing list