[R] rotate levelplot

Kang Min ngokangmin at gmail.com
Sun Oct 25 04:32:33 CET 2009


Hi all,

I have a matrix with 5 rows and 10 columns, which represent the grids
on a rectangular map.
I used the code below to plot, but it gives me the map with the 10
columns as y-axis, and the 5 rows as the x-axis, and the (0,0) point
is at the usual bottom left hand corner. My map starts with the (0,0)
at the top left hand corner.

How can I rotate the map 90 degrees clockwise so the (0,0) starts at
the top left? That means I need the 10 columns to be x-axis. I cannot
transpose the matrix because the map would be laterally flipped over.

levelplot(quadsec.mat, colorkey=list(space="bottom"), scales=list
(tick.number=10), aspect=c("iso"))

Thanks, I'm ready to give more information if needed.

Kang Min




More information about the R-help mailing list