On 24/02/2014 12:45 PM, azam jaafari wrote:
Dear All

I want to convert a scatter plot to a continuous contour plot. I have "x" as a variable 
and "y" as another variable.
is there any package for this?
can anybody halp me?

A contour plot of values associated with the points, or a contour plot of the density of the points? For the former, I think you want to use the akima package; for the density estimate, you could use kde2d from the MASS package.

In either case, you need to compute the values of the function on a grid, then the contour() function can plot it.

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to