joining dots of a scatter plot and create a line

Alireza picture Alireza · Feb 16, 2010 · Viewed 19.2k times · Source

How is possible to join dots of a scatter plot after plotting, and make a line from a dotted plot?

Answer

Jacob picture Jacob · Feb 16, 2010

I'm guessing you generated a scatter plot from x and y coordinates by,

plot(x,y,'.');

Join them with

plot(x,y,'.');
hold on;
plot(x,y,'-');

Or in one command

plot(x,y,'.-');

Is this what you wanted?