[R] contour() & contourLines()

(Ted Harding) Ted.Harding at manchester.ac.uk
Thu Oct 22 20:03:40 CEST 2009


Hi Folks,
I have been using contour() to produce some contour plots
(of a spatially-smooted density produced by kde2d()), with
very satisfactory results.

I now want access to the coordinates of the points on the
contours, and it would seem that contour() does not return a
value, so there is nothing from which these could be extracted.

However, apparently contourLines() does, and it seems to be
invoked in essentially the same way (so far as the x,y,z
and levels parameters are concerned).

However, I am not sure whether the contour lines generated
by contourLines() are the same numerically as those generated
(at any rate plotted) by contour().

By over-plotting the coordinates from contourLines() on the
contours plotted by contour(), it looks as though they may be
the same.

Advice would be appreciated!
With thanks,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 22-Oct-09                                       Time: 19:03:37
------------------------------ XFMail ------------------------------




More information about the R-help mailing list