Effacer les filtres
Effacer les filtres

Add x=y line to the scatter plot

100 vues (au cours des 30 derniers jours)
Gokhan Kayan
Gokhan Kayan le 9 Nov 2021
Commenté : Gokhan Kayan le 9 Nov 2021
Hi, I have x and y data, where
xlim([300 600])
ylim([300 600])
pbaspect([1 1 1])
How can I draw x=y line to this plot ? Is there any command to this ?

Réponse acceptée

dpb le 9 Nov 2021
hold on
  1 commentaire
Gokhan Kayan
Gokhan Kayan le 9 Nov 2021
Thanks. It worked perfectly

Connectez-vous pour commenter.

Plus de réponses (1)

Sargondjani le 9 Nov 2021
x = linspace(300,600,2);
y = x;
And you will need a hold command after the scatter command.
  1 commentaire
Gokhan Kayan
Gokhan Kayan le 9 Nov 2021
Thanks for the answeer dear Sargondjani. It worked perfectly too

Connectez-vous pour commenter.


En savoir plus sur Scatter Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by