我有
plot(rnorm(120), rnorm(120), col="darkblue", pch=16, xlim=c(-3,3), ylim=c(-4,4))
points(rnorm(120,-1,1), rnorm(120,2,1), col="darkred", pch=16)
points(c(-1,-1.5,-3), c(4,2,0), pch=3, cex=3)
我希望通过画一个经过一组点的平滑曲线来勾勒出图表的一部分。我可以定义3-4组点,但我不能定义一个函数。我想在R中完成这个任务(而不是GIMP),因为我想以SVG格式提交。我想要实现的效果如下所示:
![enter image description here](https://istack.dev59.com/uSmqJ.webp)