[R] Reverse Y-axis on hist2d diagram

Ralf B ralf.bierig at gmail.com
Fri Mar 26 10:32:51 CET 2010


I created a 2d histogram using gplots' hist2d:

hist2d(x,y, freq=TRUE, nbins=50, col = c("white",heat.colors(256)))
rug(x, side=1)
rug(y, side=2)
box()

Now I would like to reverse the Y-axis, tried to use
ylim=rev(range(1:400)) but seems not to work. Any ideas?

Ralf



More information about the R-help mailing list