How can one remove y-axis ticks on imagesc but keep labels?
9 views (last 30 days)
Show older comments
While heatmapping my data with imagesc, I want to display on my x-axis ticks and labels, but on y-axis I only want to display labels, no ticks. I know one can remove all ticks by setting the length to zero with set(gca,'TickLength',[0 0]). But how to achieve this on only one axis?
3 Comments
Accepted Answer
Adam
on 1 Feb 2019
hAxes.YAxis.TickLength = [0 0];
Following on from what you said in your own question. That seems to work. Assuming you are in a sufficiently recent version of Matlab. You didn't give your version.
1 Comment
More Answers (0)
See Also
Categories
Find more on Data Distribution Plots 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!