[R] How to use filled.contour(x,y,z) data for levelplot(z)?

From: Jan Verbesselt <Jan.Verbesselt_at_biw.kuleuven.be>
Date: Tue 10 Jan 2006 - 01:28:16 EST


Dear all,

We used the following function to create a spatial plot of a raster image:

filled.contour(xx,yy,zz, color = terrain.colors, nlevels=10, main=naamjaar, plot.axes = { contour(Xcoord/1000,Ycoord/1000,lim.data, nlevels = 4, col=4,drawlabels = T, axes = FALSE, frame.plot = FFALSE, add = TRUE);axis(1); axis(2); points(fire[,2:3]/1000,col="red",pch="*",cex=2,lwd=3)

                                })

we however would like to create 5 maps with only one legend. This seems not to be possible with filled.contour follow the help().

We therefore started looking at levelplot(zz) to create a multipanel view.

*However how could we use x and y coordinates in levelplot without using
a formula (since x,y are only the coordinates of the matrix z)?

libary(lattice)
rownames(zz) <- xx
colnames(zz) <- yy
levelplot(zz)

like this the all the row and col names are displayed in x and y axis without summarizing data similar to filled.contour function?

Thanks,
Jan

windows R 2.2

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jan 10 01:34:45 2006

This archive was generated by hypermail 2.1.8 : Tue 10 Jan 2006 - 06:23:50 EST