フィルターのクリア

remove x labels from a figure with subplots.

21 ビュー (過去 30 日間)
Binu
Binu 2024 年 3 月 12 日
コメント済み: Binu 2024 年 3 月 13 日
Hi
I have a figure with 5 subplot with the same time timeframe. I want the x axix lable only on the bottom subplot and to keep the grid and ticks in all the subplots. Appreciate your advice.
Thank you

採用された回答

Florian Bidaud
Florian Bidaud 2024 年 3 月 12 日
編集済み: Florian Bidaud 2024 年 3 月 12 日
figure
for i = 1:5
s = subplot(5,1,i);
% plot whatever you want
plot(0:10,(0:10).^i)
grid
grid minor
if i==5
xlabel('Time [s]')
else
s.XTickLabel={};
end
end
  1 件のコメント
Binu
Binu 2024 年 3 月 13 日
It worked. Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by