Making xticks match yticks?

2 次查看(过去 30 天)
L'O.G.
L'O.G. 2022-2-24
回答: Voss 2022-2-25
How can you make the xticks match the yticks without having to manually do something like the following?
xticks([-2*pi -pi 0 pi 2*pi])
yticks([-2*pi -pi 0 pi 2*pi])

采纳的回答

Voss
Voss 2022-2-25
You can do this:
set(gca(),'XTick',get(gca(),'YTick'));
For example:
plot(1:10,5:14); % plot a line
set(gca(),'XTick',get(gca(),'YTick')); % make the xticks match the yticks

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Axis Labels 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by