XGrid and XTick with different space
Afficher commentaires plus anciens
I need draw a fine grid on a figure and keep the XY Ticks as the default one. To get the fine grid, I referred to the idea using a fine ticks. For example:
figure
plot( [-1 1] , [ -1 1] )
set(gca,'Xtick',-1 : 0.02 : 1);
set(gca,'Ytick',-1 : 0.02 : 1);
grid on;
However, I got plenty of ticks which are not required. I try to remove the ticks, and only keep a few of them. But I can only remove them all or not when using the line below:
set(gca,'XTickLabel','','YTickLabel','')
I am trying to keep the ticks shown the way just like generated by the first 2 line codes. Thank you.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Grid Lines, Tick Values, and Labels dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!