필터 지우기
필터 지우기

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by