How to remove the tic labels but not the marks?
682 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Mr M.
il 11 Mar 2015
Modificato: Walter Roberson
il 21 Ago 2021
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 Commenti
Risposta accettata
Joseph Cheng
il 11 Mar 2015
Modificato: Joseph Cheng
il 11 Mar 2015
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.
Più risposte (3)
Elias Gule
il 11 Mar 2015
%%Remove tick labels for the X and Y axes
tickCell = {'XTickLabel',{},'YTickLabel',{}};
set(gca,tickCell{:});
0 Commenti
Elias Gule
il 11 Mar 2015
%%To remove tick marks on the y-axis
tickMarks = {'YTick',[]};
set(gca,tickMarks{:});
0 Commenti
Sergio Yanez-Pagans
il 21 Ago 2021
Modificato: Walter Roberson
il 21 Ago 2021
This can also help you to create ticks:
0 Commenti
Vedere anche
Categorie
Scopri di più su Axis Labels in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!