如何绘制两个方向的x轴

 采纳的回答

Voss
Voss 2022-3-18

0 个投票

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 个评论

weihan wang
weihan wang 2022-3-18
thank you very much!
Voss
Voss 2022-3-18
You're welcome!

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 可视化探查 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!