how to tick out yearly?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
davit petraasya
le 6 Mai 2016
Commenté : davit petraasya
le 6 Mai 2016
Hi
Does anyone knows how to tick out yearly? I am using set(gca,'TickDir','out'); it is working but my ticks is appearing in every 10 years. I need ticks out yearly.
So how do I tick out yearly?
Thanks!
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 6 Mai 2016
Look at this example
d=datenum('01-01-2015'):datenum('01-01-2035');
y=log(d);
plot(d,y)
a=datevec(d);
[ii,jj]=unique(a(:,1));
set(gca,'xtick',d(jj))
datetick('x','yyyy','keepticks')
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Axis Labels dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!