How to reset XTickLabel to default

In R2010b, I can reset the label shortcuts to automatically edit the picture,
but I would like to reset them to the default programmatically.
I tried

set(gca,'XTickLabel','auto')

But it displays “auto” at every tick ... Any hint?

+3
source share
2 answers

You need to install XTickLabelModeon 'auto':

set(gca,'XTickLabelMode','auto')

Label tag mode is set to 'manual'when you specify tag labels. So you need to get it back on 'auto'.

+7
source

OK, I finally found this method:

set(gca,'XTickLabel', num2str(get(gca,'XTick')'));

I read ticks and convert them back to strings ...

: , , , , / , XTickLabelMode "" , , XTickLabel .

, , ( ).
, , , , .

- , .

0

Source: https://habr.com/ru/post/1526943/


All Articles