removing numbers on axis without removing the grid lines

37 vues (au cours des 30 derniers jours)
Suleyman Deveci
Suleyman Deveci le 11 Mar 2013
Commenté : Igor Gitelman le 30 Nov 2022
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

Réponse acceptée

Walter Roberson
Walter Roberson le 11 Mar 2013
Leave the YTick alone, but set YTickLabel to []
  2 commentaires
Suleyman Deveci
Suleyman Deveci le 11 Mar 2013
Done. Thanks for your reply.
Igor Gitelman
Igor Gitelman le 30 Nov 2022
thanks. Right to the corect options!!!

Connectez-vous pour commenter.

Plus de réponses (2)

Achilleas
Achilleas le 23 Juil 2018
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 le 25 Sep 2018
How do you reverse the process in case you remove the numbering on the wrong axis?

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by