If the axes property YTickLabelMode is set to 'auto' (which it is by default) and one of the values of the property YTick is outside the limits of the visible area of the axes returned by ylim, does the YTickLabel property contain a label for that non-visible tick? It does not. If you want that tick to be labeled, you can:
- explicitly set the YTickLabel property of the axes (directly or using the yticklabels function, if you're using release R2016b or later) which will change the YTickLabelMode as a side effect or
- change the limits of the axes using ylim so that all the ticks whose labels you want to see are visible
Best Answer