Réponse acceptée

Voss
Voss le 18 Mar 2022

0 votes

If I understand what you want to do, you can try something like this:
plot(-4:4,-4:4);
ax = gca();
set(ax,'XTickLabels',abs(get(ax,'XTick')));
Note that you would also have to update the XTickLabels whenever the XTicks change, e.g., when zooming or panning or potentially when the axes changes size.

2 commentaires

weihan wang
weihan wang le 18 Mar 2022
thank you very much!
Voss
Voss le 18 Mar 2022
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 图形对象属性 dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!