1

我可以使用subplot来在同一个窗口中显示多个图像。例如,我有两个图像显示:

figure,
subFig1=subplot(1,2,1) 
surface(rawx,rawy,rawz) % 3D object 

subFig2=subplot(1,2,2)
plot(x,z) %profile of the surface. 

假设 rawx, rawy,rawz 是原始数据,x,y,z 是测量数据。我正在使用迭代“ for”来读取测量数据。

在循环过程中,是否可以按住 subFig1 并在表面顶部绘制测量的轮廓,同时 subFig2 仍然可以在 2D 中显示轮廓并在新的测量到来时刷新。

我想这可以通过不同的手柄来完成。但是,到目前为止,我找不到任何线索。请帮忙。

4

1 回答 1

4

子图中的轴的行为方式与图中的相同。最后一个调用的子图仍然处于活动状态。

在您的情况下,解决方案是:

figure, 
subFig1=subplot(1,2,1) 
surface(rawx,rawy,rawz) 

subFig2=subplot(1,2,2)
hold on
plot(x,z)

for ...
  x= ... % your new value
  z= ...
  plot(x,z) % subplot 122 still active and still hold
end
于 2011-12-08T07:53:33.703 回答