[R] Concentration ellipsoid

Duncan Murdoch murdoch at stats.uwo.ca
Sun Sep 6 16:12:02 CEST 2009


On 06/09/2009 6:08 AM, RON70 wrote:
> In the mean time, i have found one package "ellipse" to do the same. The
> syntax is :
> 
> plot(ellipse(Sigma), type='l')
> 
> However I am still struggling on how to use "qplot" (in GGPLOT2) to draw
> above plot. I want to get some stylish view for my presentation preparation.
> Any help please?

Unlike plot(), qplot() doesn't appear to use xy.coords to extract x and 
y from a single argument.  So you need to do it:

e <- ellipse(Sigma)
x <- e[,"x"]
y <- e[,"y"]
qplot(x,y,geom="path")

Duncan Murdoch




More information about the R-help mailing list