Skip to content
Prev 69774 / 398525 Next

Fitting Contour to Data Points

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