how can i join with a line, when data are plot against each other?

1 view (last 30 days)
I need to plot two data sets, plot against each other
I used the command plot(x,y,'o')
i got the scatter plot, but i need to joining the x data sets with line ( see figure).
let x data sets are Experimental values and y is predicted values.

Answers (1)

John D'Errico
John D'Errico on 21 Apr 2015
help plot
plot(x,y,'o-')
  2 Comments
Arul poomalai
Arul poomalai on 21 Apr 2015
no it will joining all the data points.
i need to join only x data sets ( experimental only)
John D'Errico
John D'Errico on 21 Apr 2015
Edited: John D'Errico on 21 Apr 2015
Did you SAY THAT when you asked the question in the first place?
Note that the plot that you eventually showed uses DIFFERENT markers for each set. In order to do that plot, you had to use plot in a different way than you said you did.
You can use multiple calls to plot (using hold on between the calls.) Or you can use one call to plot, if you do it the right way.
If your data is in an array, with multiple columns, then plot will plot each set as a separate line.
Since your immediate next question will surely be "How do I assign different markers to the lines?" then you will most easily do it with multiple plot statements.
help plot
help hold
READ THE HELP.

Sign in to comment.

Categories

Find more on Discrete Data Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!