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

1 visualización (últimos 30 días)
Arul poomalai
Arul poomalai el 21 de Abr. de 2015
Editada: John D'Errico el 21 de Abr. de 2015
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.

Respuestas (1)

John D'Errico
John D'Errico el 21 de Abr. de 2015
help plot
plot(x,y,'o-')
  2 comentarios
Arul poomalai
Arul poomalai el 21 de Abr. de 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 el 21 de Abr. de 2015
Editada: John D'Errico el 21 de Abr. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by