zhijie zhang wrote:
Dear friends,
The following is an example to explain my question. I want to get a
legend which will show the z-values according to different colors in image()
function.
x-sort(runif(10)) #x-coordinates
y-sort(runif(10)) #y-coordinates
z-matrix(runif(100),nrow=10)
Dear friends,
The following is an example to explain my question. I want to get a
legend which will show the z-values according to different colors in image()
function.
x-sort(runif(10)) #x-coordinates
y-sort(runif(10)) #y-coordinates
z-matrix(runif(100),nrow=10) #attributes values
Have you tried filled.contour()? It automatically generates a legend.
However, I'm not sure what is going on with your x's and y's being
sorted random numbers. I assume your actual data are not like this. If
you do not have data in an equally spaced grid you may need to create
one by some sort of
3 matches
Mail list logo