Is it possible to set gca for all subplots?

12 ビュー (過去 30 日間)
Mr M.
Mr M. 2015 年 4 月 23 日
回答済み: VBBV 2023 年 7 月 25 日
For example I would like to set(gca,'YTick',[]); but for all subplots

回答 (1 件)

VBBV
VBBV 2023 年 7 月 25 日
yes, its possible to set the YTick to [ ] for all subplots you want by using axes handles for individual subplots as shown below
subplot(311)
plot(1:10);grid
ax1 = gca;
subplot(312)
plot(rand(1,4)); grid
ax2 = gca;
subplot(313)
plot(rand(1,4));grid
ax3 = gca;
% single call for all axes handles
set([ax1 ax2 ax3],'YTick',[])

カテゴリ

Help Center および File ExchangeAxes Appearance についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by