Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

With octave plot, how to plot points with connection line?

Tags:

plot

octave

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');

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.

like image 307
David Guo Avatar asked May 05 '15 23:05

David Guo


1 Answers

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 with lines, all in red.

like image 113
jadhachem Avatar answered Nov 07 '22 12:11

jadhachem