removing numbers on axis without removing the grid lines

87 次查看(过去 30 天)
Hi all
When I use following command to remove numbers on the -y axis of a graph, it also removes the grid lines. How can I keep the grid lines?
set(gca,'YTick',[])
Regards
Suleyman

采纳的回答

Walter Roberson
Walter Roberson 2013-3-11
Leave the YTick alone, but set YTickLabel to []

更多回答(2 个)

Achilleas
Achilleas 2018-7-23
The aforementioned solution didn't work for me, meaning that I wasn't able to activate the grid minor choice.
So, I used this 'xticklabel',num2str('').

C. Nwachoma
C. Nwachoma 2018-9-25
How do you reverse the process in case you remove the numbering on the wrong axis?

类别

Help CenterFile Exchange 中查找有关 Graphics 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by