Setting axis tick labels - problems with repeated plots

3 views (last 30 days)
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 Comments
lvn
lvn on 19 Mar 2014
also make a new figure ("figure") or close your figure ("close all") before making a new one
dpb
dpb on 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.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!