[R] Plot of set

David Winsemius dwinsemius at comcast.net
Sun Feb 20 18:27:46 CET 2011


On Feb 20, 2011, at 4:41 AM, . . wrote:

>
> I am in the situation where I have to make a two-dimential plot of a  
> set. If I simplify my data it would be something along the lines of  
> wanting to plot {x,y| x^2+y^2 < = 1}.
> I am aware of the contour and persp plot, but cannot figure out how  
> to convert one of those to draw the set. I have tried to google  
> different ways of plotting in R but have not been able to find a  
> method through that either.


I don't see a third dimension implied in what you presented:

x <- runif(1000)
y <- runif(1000)
plot(x[x^2 +y^2 < 1], y[x^2 +y^2 < 1])
title(main="Uncorrelated X and Y ointly satisfying condition")

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list