remove x labels from a figure with subplots.
31 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!