[R] Ternary Plots Do Not Display Ellipses in PDF

Rich Shepard rshepard at appl-ecosys.com
Wed Oct 15 18:00:48 CEST 2014


On Wed, 15 Oct 2014, David L Carlson wrote:

> I haven't looked at the source so I don't know exactly what is going on,
> but I think I have a work around:

>> plot(winters.acomp, main="Winters Creek", cex=0.5)
>> pdf("winters-pdf.pdf")
>> ellipses(mean=mn, var=vr, r=r, steps=72, thinRatio=NULL, aspanel=FALSE,
> +  col='red', lwd=2)
>> dev.off()

   Well, there is certainly something different here:

> library(compositions)
> plot(winters.acomp, main="Winters Creek", cex=0.5)
> r <- sqrt(qchisq(p=0.95, df=4))
> mn <- mean(winters.acomp)
> vr <- var(winters.acomp)
> pdf("winters-ffg-prop.pdf")
> ellipses(mean=mn, var=vr, r=r, steps=72, thinRatio=NULL, aspanel=FALSE,
> col='red', lwd=2)
Error in if (coorgeo == "acomp") { : argument is of length zero
> dev.off()

   So it works for David and Rolf, but not for me. Environment: R-3.1.1 on
Slackware-14.1 in Emacs-24.3 with ESS-13.09-1 and compositions-1.40-1.

   I would appreciate assistance from one of you R gurus in finding the
source of this problem and fixing it. Communicating off the mail list (until
the solution is reached) might be a good idea to avoid clutter.

TIA,

Rich



More information about the R-help mailing list