代码之家  ›  专栏  ›  技术社区  ›  Xia.Song

Julia中的轨迹图

  •  0
  • Xia.Song  · 技术社区  · 8 年前
    using Gadfly;
    bb=randn(20,2)
    plot(x=bb[:,1],y=bb[:,2],Geom.line)
    

    enter image description here

    但是我想画出所有点的轨迹,这样我就可以得到这样的图 enter image description here

    1 回复  |  直到 8 年前
        1
  •  0
  •   inarighas Tarak    8 年前

    使用x和y值绘制路径曲线的步骤

    plot(Geom.line(preserve_order=true), Geom.point, x=bb[:,1], y=bb[:,2])

    plot(Geom.path, x=bb[:,1], y=bb[:,2])

    我明白了 enter image description here

    推荐文章