Re: [R] how to draw an ellipse

2005-08-18 Thread Ben Bolker

Guillaume Allain guillaume.allain at cbconseil.com writes:

 
 That's probably a stupid question, but I'm looking for a low-level 
 command which plots ellipse, specifying only center and deformation 
 axes. The purpose is to illustrate bivariates gaussians with 2D .95 
 confident levels without using any specific library.
 
 Thanxs for your help,
 
 Guillaume


  I don't know exactly why you want to avoid using any specific
library, but the ellipse package (sic) would seem to do what
you want pretty conveniently ...

  cheers
Ben Bolker

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] how to draw an ellipse

2005-08-18 Thread Romain Francois
Le 18.08.2005 15:45, Guillaume Allain a écrit :

That's probably a stupid question, but I'm looking for a low-level 
command which plots ellipse, specifying only center and deformation 
axes. The purpose is to illustrate bivariates gaussians with 2D .95 
confident levels without using any specific library.

Thanxs for your help,

Guillaume
  

Hello,

Why don't you want to use any specific library ? You can't reinvent the 
wheel !!
There is a package ellipse on CRAN which will do what you are looking for.
Have you tried
  RSiteSearch(ellipse)

Cheers,

Romain

-- 
visit the R Graph Gallery : http://addictedtor.free.fr/graphiques
 ~ 
~~  Romain FRANCOIS - http://addictedtor.free.fr ~~
Etudiant  ISUP - CS3 - Industrie et Services   
~~http://www.isup.cicrp.jussieu.fr/  ~~
   Stagiaire INRIA Futurs - Equipe SELECT  
~~   http://www.inria.fr/recherche/equipes/select.fr.html~~
 ~ 

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] how to draw an ellipse

2005-08-18 Thread Barry Rowlingson
Romain Francois wrote:

 Why don't you want to use any specific library ? You can't reinvent the 
 wheel !!

  True, but Madonna is always reinventing herself...

 There is a package ellipse on CRAN which will do what you are looking for.
 Have you tried
   RSiteSearch(ellipse)

  its simple geometry really:

   theta=seq(0,2*pi,len=100)
   e=1.5
   r=3
   x=e*r*cos(theta)
   y=r*sin(theta)
   plot(x,y,asp=1)

  rotate with:

   phi=pi/4
   xr=x*sin(phi)+y*cos(phi)
   yr=-x*cos(phi)+y*sin(phi)
   plot(xr,yr,asp=1)

  or something. Wrap that up into a function and you're done. This is 
off-the-cuff, I've probably messed something up. So use one prepared 
earlier from a library...

Baz

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] how to draw an ellipse

2005-08-18 Thread Guillaume Allain
Congratulations guys, you made my day better and funnier!

Le 18 août 05, à 17:31, Barry Rowlingson a écrit :

 Romain Francois wrote:

 Why don't you want to use any specific library ? You can't reinvent 
 the wheel !!

  True, but Madonna is always reinventing herself...

 There is a package ellipse on CRAN which will do what you are looking 
 for.
 Have you tried
   RSiteSearch(ellipse)

  its simple geometry really:

   theta=seq(0,2*pi,len=100)
   e=1.5
   r=3
   x=e*r*cos(theta)
   y=r*sin(theta)
   plot(x,y,asp=1)

  rotate with:

   phi=pi/4
   xr=x*sin(phi)+y*cos(phi)
   yr=-x*cos(phi)+y*sin(phi)
   plot(xr,yr,asp=1)

  or something. Wrap that up into a function and you're done. This is 
 off-the-cuff, I've probably messed something up. So use one prepared 
 earlier from a library...

 Baz


__
Guillaume Allain
Carte Blanche Conseil
47 rue de Lancry 75010
Tel   : 01 42412121
Mail : [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html