What's the corresponding function to "xtickformat" in Matlab R2015a?

Hello, I want to use the function:
xtickformat('hh:mm')
in Matlab R2015a, but it told me:
Undefined function or variable 'xtickformat'.
How can I fix this?

 Accepted Answer

You probably are looking for the datetick (link) function.

3 Comments

Right. R2015a had hidden XRuler, YRuler, and ZRuler properties for axes, but the TickLabelFormat property had not been implemented at that time.
I tried it too but it didn't work.
What is the class() of your data on the x axis?
Note: you need to re-do the datetick() after each zoom or pan. datetick() sets the axes xticklabel property to particular strings, and is not able to update automatically when the tick locations change due to zoom or pan.

Sign in to comment.

More Answers (0)

Categories

Products

Asked:

on 11 May 2017

Commented:

on 29 Jul 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!