Fix scaling of mesh plot during movie

1 次查看(过去 30 天)
Kilian
Kilian 2013-11-26
评论: Kilian 2013-11-27
I am creating a movie from a sequence of mesh plot images. I am trying to fix the scale in z direction, but for some reason the image scaling seems to change with every image. Any ideas. Here is what I have so far:
SWT = size(WT); zmin = min(min(min(WT)))*30; zmax = max(max(max(WT)))*30;
for m = 1:SWT(3) mesh(WT(:,:,m)) view (0.001,90) axis([1 88 1 122 zmin zmax]) caxis manual M(m) = getframe; pause(0.1) end

回答(1 个)

Image Analyst
Image Analyst 2013-11-26
Use xlim() and ylim() to set the axes to predetermined sizes. Use set(gca, 'Position', [left, top, width, height]) to set the overall graph to a predetermined size.
  1 个评论
Kilian
Kilian 2013-11-27
Thanks for your help. Acutally, xlim and ylim didn't work because I wanted to fix the scale in the z direction. zlim didn't work either, however I was able to do it with caxis([-0.0003 0.0003]).

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by