Effacer les filtres
Effacer les filtres

[GUI] How do change the min and max values of a plot.

1 vue (au cours des 30 derniers jours)
Shane
Shane le 19 Déc 2012
I want to change the min and max values of a plot in GUI.
And the following code doesn't work:
axis(handles.axes1,[0,100,0,1]);
This is because then when I plot a scatter after
scatter(handles.axes1, x, y);
It doesn't keep the same dimensions on the axes.
I then tried hold(handles.axes1);
between the two bits of code and it still doesn't work... confused.
What am I doing wrong?

Réponses (1)

Image Analyst
Image Analyst le 19 Déc 2012
Use the xlim() and ylim() functions.
  7 commentaires
Jan
Jan le 19 Déc 2012
@Shane: Besides Walter's suggestion, what about calling XLIM after all plots have been made?
Shane
Shane le 19 Déc 2012
then it sets the limits and removes the plot >.<

Connectez-vous pour commenter.

Catégories

En savoir plus sur 2-D and 3-D 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