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.
0 个评论
回答(1 个)
John D'Errico
2015-4-21
help plot
plot(x,y,'o-')
2 个评论
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 Center 和 File Exchange 中查找有关 Discrete Data Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!