フィルターのクリア

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 Center および File ExchangeAxis Labels についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by