Shrinking subplot in loop
1 view (last 30 days)
Show older comments
I have noticed that when using subplot in a loop, the figures get linearly smaller with each loop until they have no height. The following is appended at the end of a loop and results in the problem:
subplot(3,2,1)
imagesc(tk); colorbar;
title('temp'); set(gca,'YDir','normal');
subplot(3,2,2)
imagesc(rho); colorbar;
title('density'); set(gca,'YDir','normal');
subplot(3,2,3)
imagesc(sqrt(vx.^2+vy.^2)); colorbar;
title('velocities'); set(gca,'YDir','normal')
subplot(3,2,4)
imagesc(log10(etas)); colorbar;
title('viscosity'); set(gca,'YDir','normal')
subplot(3,2,5)
imagesc(soxy); colorbar;
title('shear stress'); set(gca,'YDir','normal')
subplot(3,2,6)
imagesc(soxx); colorbar;
title('normal stress'); set(gca,'YDir','normal')
drawnow
pause(0.1)
1 Comment
Jan
on 10 Mar 2014
What is your question? We cannot run the code due to the missing variables and we cannot see what you observe. You talk of subplots in a loop, but the posted code does not contain a loop.
Please post a piece of code, which reproduces the problem.
Answers (0)
See Also
Categories
Find more on Subplots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!