How to change the tick frequency on a timeseries x axis
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Nikolaos Zikas
el 27 de En. de 2014
0 votos
3 comentarios
Walter Roberson
el 27 de En. de 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
el 18 de Feb. de 2014
abishek dixit
el 19 de Nov. de 2017
can you tell exact method as well?
Categorías
Más información sobre Grid Lines, Tick Values, and Labels en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!