[R] image() plot with z not in matrix format

mdgi at gmx.ch mdgi at gmx.ch
Thu Nov 29 12:52:32 CET 2007

Hello R cracks

The image() function requires strictly increasing x and y values and z as a matrix.

Actually, I don't have equally spaced variables, but anyway want to plot an colored image() (with z-information).

An example of my problem is here:

a<-data.frame(rnorm(100), rnorm(100), runif(100)*100)

How can I plot this data as an image (x=a[,1], y=a[,2] and z=a[,3])-> according to ?image.
It has to be possible to adapt the grid size so that every grid cell in the plot is coloured consequently.

Thanks for your help


More information about the R-help mailing list