how can i join with a line, when data are plot against each other?
조회 수: 2 (최근 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!