Skip to content
Prev 243981 / 398506 Next

Error in calcCurveGrob(x, x$debug) : End points must not be identical

Hi
Bryan Hanson wrote:
I get ...

  which(tst$x.st == tst$x.end & tst$y.st == tst$y.end)
[1] 11 14

Also, the viewport you have set up will not show any of the curves 
because its "native" scale is 0 to 1.  The following at least makes the 
curves visible ...

grid.newpage()
vp <- viewport(width = 0.9, height = 0.9, x = 0.5, y = 0.5,
                xscale=c(-10, 10), yscale=c(-15, 15))
pushViewport(vp)
grid.rect(gp = gpar(lty = "dashed", col = "gray"))
grid.points(0.5, 0.5, pch = 20, gp = gpar(cex = 0.5))
subset <- -c(11, 14)
grid.curve(tst$x.st[subset], tst$y.st[subset],
            tst$x.end[subset], tst$y.end[subset],
            default.units = "native")

Paul

p.s.  Intrigued to know what sort of image you are producing, if you are 
able to share.