Thanks a lot Rolf, I knew it would be possible to do it that way but I  
was just curious to know if the ellipse package was offering such a  
feature. Thanks again for you help!

Antoine
Le 28 sept. 11 à 09:30, Rolf Turner-3 [via R] a écrit :

> On 28/09/11 04:53, Antoine wrote:
> > Dear list members,
> >
> > This might be a silly question but I just can't figure it out. I  
> am using
> > the "ellipse" package on covariance matrices. I would simply like  
> to plot my
> > ellipses WITH its two axis ploted as well. These axis represents  
> the 2 eigen
> > vectors of my matrix and it is important that I can graphically  
> show them.
> > Is there an easy way to do so?
>
> Pretty easy.
>
> * Calculate your eigenvalues and vectors using eigen().
>
> * Rescale the vectors by multiplying them by the square
> root of the corresponding eigenvalues, and by the constant
> corresponding to the confidence level --- e.g. sqrt(qchisq(0.95,2))
> for the usual 95% confidence level.
>
> * Add these vectors to the ellipse plot, using segments().
> E.g. if your rescaled eigenvectors are v1 and v2, just do:
>
>      segments(-v1[1],-v1[2],v1[1],v1[2])
>
> and
>
>      segments(-v2[1],-v2[2],v2[1],v2[2])
>
>      cheers,
>
>          Rolf Turner
>
> ______________________________________________
> [hidden email] 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.
>
>
> If you reply to this email, your message will be added to the  
> discussion below:
> http://r.789695.n4.nabble.com/Adding-axis-to-an-ellipse-ellipse-package-tp3847954p3850233.html
> To unsubscribe from Adding axis to an ellipse: "ellipse" package,  
> click here.



--
View this message in context: http://r.789695.n4.nabble.com/Adding-axis-to-an-ellipse-ellipse-package-tp3847954p3850237.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]

