对于多条轨迹,我具有轨迹中每个点的二维坐标。我想使用python(最好是matplotlib)在一个绘图上绘制所有这些轨迹。我想要轨迹的时序图,如示例图中的左图所示。我在Internet上找到的样本图是
答案 0 :(得分:0)
使用 pyplot.plot()方法。您可以在同一图形上绘制任意数量的轨迹。
@XmlElement
对于3D图:
from matplotlib import pyplot
x = range(12)
y1 = range(12)
y2 = [i**2 for i in x]
# y3,y4,...yn
pyplot.plot(x,y1)
pyplot.plot(x,y2)
pyplot.show()