I have data like this:
我有这样的数据:
x = [23, 25, 28, 29, ...]
y = [25, 38, 38, 28, ...]
Now, I can plot the points with plot(x, y, '.r');
现在,我可以用积分绘制点(x,y,'。r');
I collect above points data by a time sequence, now, I want to connect the points with a line, so that I can see which is the next point of one specific point.
我按时间顺序收集上面的点数据,现在,我想用一条线连接点,这样我就可以看到哪一个是特定点的下一个点。
1 个解决方案
#1
plot()
can be used to draw points-and-lines like this:
plot()可用于绘制点和线,如下所示:
plot(x, y, 'o-r');
This draws the points as circles, and connects them with lines, all in red.
这将点绘制为圆圈,并将它们与线条连接,全部为红色。
#1
plot()
can be used to draw points-and-lines like this:
plot()可用于绘制点和线,如下所示:
plot(x, y, 'o-r');
This draws the points as circles, and connects them with lines, all in red.
这将点绘制为圆圈,并将它们与线条连接,全部为红色。