[R] Help with dataEllipse function

John Fox jfox at mcmaster.ca
Fri Apr 26 14:30:10 CEST 2013


Dear Jana,

The lty argument to dataEllipse() (in the car package) isn't vectorized. It could be, and I'll add that as a feature request. Actually, lty isn't an explicit argument to dataEllipse(); it's simply passed through to the lines() function, which draws the ellipses.

You should be able to do what you want by adding the ellipses one at a time to your plot (see the argument add in ?dataEllipse) or by using the coordinates of the ellipses, returned by dataEllipse(), to a customized graph.

I hope that this helps,
 John

------------------------------------------------
John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/
	
On Thu, 25 Apr 2013 20:00:20 -0400
 Jana Makedonska <jmakedonska at gmail.com> wrote:
> Hi Everyone,
> 
> I am working with the R function "dataEllipse". I plot the 95% confidence
> ellipses for several different samples in the same plot and I color-code
> the ellipse of each sample, but I do not know how to specify a different
> line pattern for each ellipse. I can only modify the pattern for all
> ellipses with the "lty" argument. Any help will be highly appreciated.
> 
> Thanks in advance!
> Jana
> 
> -- 
> 
> 
> Jana Makedonska,
> B.Sc. Biology, Universite Paul Sabatier Toulouse III
> M.Sc. Paleontology, Paleobiology and Phylogeny, Universite de Montpellier II
> Ph.D. candidate in Physical Anthropology and Part-time lecturer
> Department of Anthropology
> College of Arts & Sciences
> State University of New York at Albany
> 1400 Washington Avenue
> 12222 Albany, NY
> Office phone: 518-442-4699
> http://electricsongs.academia.edu/JanaMakedonska
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list