[R] Fitting Contour to Data Points
Laura Quinn
laura at env.leeds.ac.uk
Mon May 16 12:17:14 CEST 2005
Apologies for the mass mailing today!
I am attempting to produce a contour plot for phsical data on a map
matrix. I have a small number of data points which each has an (x,y)
co-ordinate together with a corresponding value which I would like to
cvreate a contour plot for.
I have tried the following code:
contour(data$x,data$y,data$value)
but am told:
Error in contour.default(data$x, data$y, data$value) :
increasing x and y values expected
I have re-ordered the matrix so that the x values are increasing, but
these do not necessarrily correspond with increasing y values (as this is
not a regular grid)...can anyone offer a way around this??
Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT
tel: +44 113 343 1596
fax: +44 113 343 6716
mail: laura at env.leeds.ac.uk
More information about the R-help
mailing list