Xticklabels remaining fixed when replotting with different x values
Show older comments
I have a plot that I manually scale. I also want to adjust the fontsize of the ticklabels. so my code is:
xlim([0 xdata(end)])
a = get(gca,'XTickLabel');
set(gca,'XTickLabel',a,'FontName','Helvetica','fontsize',6);
But, say my first plot has 1600 points, all is well. But when I perform the same plot with say 400 points of data, the graph displays correctly but the ticklabels still read upto 1600.
1 Comment
Jason
on 6 Nov 2015
Accepted Answer
More Answers (0)
Categories
Find more on Labels and Styling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!