Problem with subplot ful screen

1 回表示 (過去 30 日間)
basma awad
basma awad 2021 年 10 月 27 日
回答済み: Jan 2021 年 10 月 27 日
Hello
I am making a plot with 5 x2 plots using subplot. But when i plot the final figure doesnt show on the whole scrren like this.
Its not showing full screen
This is my code
t =[1 2 3];
figure()
subplot(10,2,1)
scatter(t,Aya(:,1))
xlim([0 4])
ylim([0 100])
title('Stimuli A')
grid on
subplot(10,2,2)
scatter(t,Aya(:,2))
xlim([0 4])
ylim([0 100])
title('Stimuli b')
grid on
subplot(10,2,3)
scatter(t,Farah(:,1))
xlim([0 4])
ylim([0 100])
title('Stimuli A')
subplot(10,2,4)
grid on
scatter(t,Farah(:,2))
xlim([0 4])
ylim([0 100])
title('Stimuli b')
grid on
subplot(10,2,5)
scatter(t,Hamza(:,1))
xlim([0 4])
ylim([0 100])
title('Stimuli A')
grid on
subplot(10,2,6)
scatter(t,Hamza(:,2))
xlim([0 4])
ylim([0 100])
title('Stimuli b')
grid on
subplot(10,2,7)
scatter(t,Jaffa(:,1))
xlim([0 4])
ylim([0 100])
title('Stimuli A')
grid on
subplot(10,2,8)
scatter(t,Jaffa(:,2))
xlim([0 4])
ylim([0 100])
title('Stimuli b')
grid on
subplot(10,2,9)
scatter(t,Monique(:,1))
xlim([0 4])
ylim([0 100])
title('Stimuli A')
grid on
subplot(10,2,10)
scatter(t,Monique(:,2))
xlim([0 4])
ylim([0 100])
title('Stimuli b')
grid on

回答 (1 件)

Jan
Jan 2021 年 10 月 27 日
Yes, of course. You are creating a 10x2 table of plots:
subplot(10,2,1)
% ^^
Use subplot(5, 2, k) for a 5x2 table.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by