Effacer les filtres
Effacer les filtres

How do I scale a scatter-plot to 250 by 250 using the line data type?

20 vues (au cours des 30 derniers jours)
Jennifer Smith
Jennifer Smith le 15 Fév 2015
Commenté : Jennifer Smith le 15 Fév 2015
This is the code:
% x=[1,2,3,4,5,6]
y=exp(x)
scatter(x,y,'*')
line(25,4)
When I tried doing this, I got a scale of 450 by 25. Thanks in advance.

Réponse acceptée

emehmetcik
emehmetcik le 15 Fév 2015
I assume you want to set the axis limits to 0 to 250 for x and 0 to 250 for y. This can be done by "axis"function.
axis([0, 250, 0, 250]); % axis([xmin, xmax, ymin, ymax])
axis equal % May be useful as well.
See Matlab documenation for "axis" function;
  2 commentaires
Jennifer Smith
Jennifer Smith le 15 Fév 2015
This seems like a reasonable method. I can try this.
Jennifer Smith
Jennifer Smith le 15 Fév 2015
Thank you very much.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by