如何绘制两个方向的x轴

 Respuesta aceptada

Voss
Voss el 18 de Mzo. de 2022

0 votos

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 comentarios

weihan wang
weihan wang el 18 de Mzo. de 2022
thank you very much!
Voss
Voss el 18 de Mzo. de 2022
You're welcome!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 可视化探查 en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 18 de Mzo. de 2022

Comentada:

el 18 de Mzo. de 2022

Community Treasure Hunt

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

Start Hunting!