Hi All, I am new to the grid package. Please pardon me for asking a question that may be a trivial one.
If two curves created by grid::xsplineGrob() intersect, is there any existing function that can find this/these point(s)? This is an example: library(grid) x1 <- c(0.25, 0.25, 0.75, 0.75) x2 <- c(0.05, 0.15, 0.25, 0.35) y1 <- c(0.25, 0.75, 0.75, 0.25) a <- xsplineGrob(x1, y1, shape = 1) b <- xsplineGrob(x2, y1, shape = .5) grid.draw(a) grid.draw(b) Specifically, I would like to find these points without drawing the two curves using grid.draw(). I found methods to find this/these point(s) on the internet. But this is a frequently asked question, so I guess maybe there are existing functions/packages that can do this. However, I could not yet find any. Regards, Shu Fai Cheung ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.