With an octave plot, how to build connected points?

I have data like this:

x = [23, 25, 28, 29, ...]
y = [25, 38, 38, 28, ...]

      

Now I can plot points with plot(x, y, '.r');

I am collecting point data over 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 particular point.

+3


source to share


1 answer


plot()

can be used to draw points and lines like this:

plot(x, y, 'o-r');

      



This draws the points as circles and connects them to lines, all in red.

+5


source







All Articles