Setting axis tick labels - problems with repeated plots
Afficher commentaires plus anciens
I am using XTick and XTickLabel to set the labels of the x axis in a plot. It works as expected, but if I then make another plot, the labels from the previous plot are included in the new one, even though I have used "clear all" before the second plot. Why could this be happening? If I close and re-open matlab, I have just the ticks and labels I want for the new plot, but this is definitely too time consuming to do every time.
3 commentaires
Chandrasekhar
le 19 Mar 2014
have you tried the below commands before plotting a new one.
clear axes
cla reset
lvn
le 19 Mar 2014
also make a new figure ("figure") or close your figure ("close all") before making a new one
dpb
le 19 Mar 2014
Probably ensure that
hold off
is in effect before starting the new plot is all that's required I guess...altho if the new plot is indeed totally independent of the previous then
close(gcf)
figure
is the logical sequence, indeed.
Réponses (0)
Catégories
En savoir plus sur Grid Lines, Tick Values, and Labels dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!