Solved – Drawing smooth 2D curves with 2D spline in R

data visualizationr

The problem I am running into here is the following: there is a set of 4 points in 2D, and I need to plot a smooth curve in 2D space that runs through these points. Is there a package in R to do this?

Best Answer

The xspline function offers a generalization of Catmull-Rom splines, which sounds like what you want. From the examples:

xspline example