[R] Ternary Plots Do Not Display Ellipses in PDF

Rich Shepard rshepard at appl-ecosys.com
Wed Oct 15 16:20:25 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. While running your example I noticed
> that ellipse() does not just add the ellipse to the plot produced by
> plot(), it replots the figure. However, just running ellipse() without
> plot() generates an error "Error in if (coorgeo == "acomp") { : argument
> is of length zero" so ellipse needs the plot environment produced by
> plot(). Moving the pdf() file works on my Windows machine:
>
>> 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()

David,

   How interesting! I saw what I now know as the plot being redrawn when the
ellipses were added but did not recognize the significance. I'll try this
in a while but it should work here, too.

Much appreciated,

Rich



More information about the R-help mailing list