Shrinking subplot in loop

2 次查看(过去 30 天)
Christopher
Christopher 2014-3-10
评论: Jan 2014-3-10
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 个评论
Jan
Jan 2014-3-10
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.

请先登录,再进行评论。

回答(0 个)

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by