Skip to content

upside down image/data

2 messages · Jenny Barnes, Thomas Harte

#
Thomas,

Thank you for this example, makes it easier to see what levelplot does - does 
this mean that EVERY time I want to plot with levelplot() I have to not only 
reverse the columns [,ncol(output.temp):1] but also have to transform the matrix 
as below? I am only suprised as I don't remember having read about this in the 
R-info in ?levelplot or R-help website and it seems like a fundamental thing to 
know if using levelplot! 

Thanks,

Jenny
dimensional)
my matrix
the line:
increasing in
the
hard to know
simply by
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jennifer Barnes
PhD student - long range drought prediction
Climate Extremes
Department of Space and Climate Physics
University College London
Holmbury St Mary, Dorking
Surrey
RH5 6NT
01483 204149
07916 139187
Web: http://climate.mssl.ucl.ac.uk
#
the transform that i provided orientates the data matrix so that when plotted with image
or levelplot the result is isomorphic to what you see when you print the matrix at the r
prompt.

i don't know what your data look like---"commented, minimal, self-contained, reproducible
code" would help---but you should be able to work out exactly what way you want your data
to appear by playing with the example code. i would advise you to produce a data matrix
the way you want to see it on the screen, just like the matrix m in the example code, and
then view the output with levelplot(inverse(m)), in which case, the answer to your
question is you only need to transform the data with inverse() once you get your data
matrix to look the way you want at the r prompt.
--- Jenny Barnes <jmb at mssl.ucl.ac.uk> wrote: