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

1 次查看(过去 30 天)
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.

回答(1 个)

John D'Errico
John D'Errico 2015-4-21
help plot
plot(x,y,'o-')
  2 个评论
Arul poomalai
Arul poomalai 2015-4-21
no it will joining all the data points.
i need to join only x data sets ( experimental only)
John D'Errico
John D'Errico 2015-4-21
编辑:John D'Errico 2015-4-21
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Discrete Data Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by