[R] Ellipse: Major Axis Minor Axis

Jari Oksanen jari.oksanen at oulu.fi
Wed Sep 2 08:27:53 CEST 2009


Vishal <vishalps <at> gmail.com> writes:

> 
> I have a matrix(3000x2) of numbers and I have plotted a scatterplot
> (defined in the ``car'' library.)
> 
> scatterplot(r$V1,r$V2,ellipse=TRUE)
> 
> The ellipse plotted is an error ellipse.
> 
> I want the find the major(semi), minor(semi) minor axis length of this
> ellipse.

> 
If you have the ellipse from cov.trob(), then you could do like this

sqrt(eigen(cov.trob(mydataforellipse)$cov)$values)

Cheers, Jari Oksanen




More information about the R-help mailing list