Increase gap between XTick and XTickLabel
Show older comments
Hi, I'm plotting a graph that has 262 measured points. I have a 262x1 text cell array called 'txt' which contains the data I want to label for the X labels. I have started out with this code to place the corresponding x labels with each measured point.
set(gca, 'XTick',1:262, 'XTickLabel',txt(:,1))
But if I use this code all the x labels are all muddled up and you cant read the text.
I have tried:
set(gca, 'XTick',1:30:262, 'XTickLabel',txt(:,1))
But each x label doesn't line up with the corresponding measured point. How can I label the x labels but have a gap around 30 measured points between each x label, but also ensuring the measured points line up with the corresponding x label? Thanks.
Accepted Answer
More Answers (0)
Categories
Find more on Axis Labels in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!