R: Quadratic curve is printing as dozens of lines

后端 未结 1 783
暖寄归人
暖寄归人 2021-01-22 02:37

Instead of printing a nice curve, R is printing a dense mess of line segments. The edge of that dense mess looks exactly like the curve I\'m trying to print, though.

相关标签:
1条回答
  • 2021-01-22 03:13

    lines will draw lines between the points in the order they are given. Something like

    plot(X2,Y2)
    ox2 <- order(X2)
    lines(X2[ox2],fitted(model2s)[ox2])
    

    should give you what you're looking for.

    0 讨论(0)
提交回复
热议问题