How to change the tick frequency on a timeseries x axis
Afficher commentaires plus anciens
Hello can u please let me know how can I change the xticks on a time series. The ticks are displayed every 3 months, while I need one month ticks. The time series dates are real data and can not evenly distribute them. Thank you for your reply. Best, Nick
Réponse acceptée
Plus de réponses (1)
Nikolaos Zikas
le 27 Jan 2014
0 votes
3 commentaires
Walter Roberson
le 27 Jan 2014
If the X axis is in serial date number, then a month is approximately 30 days, so at first pass you could use
set(gca, 'XTick', (first_datenum : 30 : last_datenum) );
There are more exact methods, of course.
Nikolaos Zikas
le 18 Fév 2014
abishek dixit
le 19 Nov 2017
can you tell exact method as well?
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!