How to remove the tic labels but not the marks?
435 次查看(过去 30 天)
显示 更早的评论
I would like to remove tick marks on the y-axis but not on the x-axes. And I want to remove the labels (numbers) of all ticks.
0 个评论
采纳的回答
Joseph Cheng
2015-3-11
编辑:Joseph Cheng
2015-3-11
what you could do is use the set command for the axis. like
set(gca,'YTick',[]); %which will get rid of all the markings for the y axis
or
set(gca,'Yticklabel',[])
set(gca,'Xticklabel',[]) %to just get rid of the numbers but leave the ticks.
更多回答(3 个)
Elias Gule
2015-3-11
%%Remove tick labels for the X and Y axes
tickCell = {'XTickLabel',{},'YTickLabel',{}};
set(gca,tickCell{:});
0 个评论
Elias Gule
2015-3-11
%%To remove tick marks on the y-axis
tickMarks = {'YTick',[]};
set(gca,tickMarks{:});
0 个评论
Sergio Yanez-Pagans
2021-8-21
编辑:Walter Roberson
2021-8-21
This can also help you to create ticks:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!