MATLAB: Is there a way to label minor axis ticks in Matlab

xtickminor label

I am using datetick() to display the x axis labels in months. I have added minor ticks as days. I would like to display the day of month just above the month tick label, but cannot find a way to label the minor ticks.

Best Answer

Minor ticks are meant to be used without labels. Using the "XMinorTick" axes property, you can only control the visibility of minor ticks by setting it to on/off. There is no axes property that can be directly used to set the minor ticks 'labels.
You can possibly set "XMinorTick" to off and adjust XTick accordingly. Please refer this MATLAB answers post: https://www.mathworks.com/matlabcentral/answers/17559-labeling-minor-tick-marks-in-plots