How can one remove axis ticks on imagesc but keep labels?
조회 수: 48 (최근 30일)
이전 댓글 표시
I am trying to remove the physical tick marks from imagesc on both the x and y axes, but have labels for both axes I want to keep. Is there a way to remove the ticks, or control the size of them so they are virtually invisible?
댓글 수: 0
답변 (2개)
Mike Garrity
2016년 3월 3일
Have you tried setting the length of the ticks to 0?
set(gca,'TickLength',[0 0])
댓글 수: 2
Mr M.
2018년 7월 23일
I have the same problem, but I do not need the axis lines, nor ticks, but I want to keep the xlabel and ylabel. How to do this?
Ruben Haverkort
2021년 5월 28일
편집: Ruben Haverkort
2021년 5월 28일
Hi Mr M.
This answer is probably a bit late for you, but maybe somebody else googling this topic might benefit.
To remove the 'axis lines', use
grid off
참고 항목
카테고리
Help Center 및 File Exchange에서 Formatting and Annotation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!