Increasing Size of Subplot

30 views (last 30 days)
Jaden
Jaden on 15 Oct 2025 at 22:25
Edited: dpb on 16 Oct 2025 at 13:15
I originally started with 3 planes at z = 0.04, 0.05, and 0.06 and the subplots were fine. I've since added planes at 0.03 and 0.07, now the subplots are completely unreadable. Any idea how I can increase the size of them?
  1 Comment
Matt J
Matt J on 15 Oct 2025 at 22:56
Edited: Matt J on 15 Oct 2025 at 22:56
Code? We have no idea what you did.

Sign in to comment.

Answers (1)

dpb
dpb on 16 Oct 2025 at 0:26
Edited: dpb on 16 Oct 2025 at 13:15
When you went from (guessing) a 3 or 4 x 2 layout to what appears to be 6x2, there simply isn't much room going to be available.
figure
R=4; C=2;
for i=1:R*C
subplot(R,C,i)
end
figure
R=6; C=2;
for i=1:R*C
subplot(R,C,i)
end
subplot() is relatively difficult to do much with; you might have better luck with tiledlayout; it has some spacing named-value pairs you can use to maximize visible plotting area...
figure
R=4; C=2;
tl=tiledlayout(R,C,'TileSpacing','compact','Padding','compact');
for i=1:R*C
nexttile(tl);
end
but it's still going to be pretty tight vertically. As Dolly Parton told Johnny Carson one night, "You can't put 10-lbs of taters in a 5-lb tote!". You need to rethink how much you're trying to put into the one figure.
One alternative might be stackedplot if the various responses are against the same independent variable.
But, the above is mostly conjecture for lack of hard information; as @Matt J says, we need to see actual code with sample data to have any real idea.

Tags

Community Treasure Hunt

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

Start Hunting!