我希望我的图形能够固定坐标轴,并且还可以逐个绘制数据。所有的东西都是已知的,但是如果我使用暂停来移除第一组数据,它也会忘记轴上的限制并自动为第二组数据分配新的限制。 是否有可能在每次将单独的数据块绘制在同一图中时保持坐标轴一致?仅保留坐标轴,而不保存数据
现在的代码是:
figure(4)
grid on
axis([xL yL zL])
for j = 1:n % n is amount of data sets
for i = 1:2 % two items drawn per data set
*plot data*
hold on
end
%This part has to be done every iteration again in order to make it work now
axis([xL yL zL])
xlabel = ...
ylabel
zlabel
title
pause(tstop)
hold off
end
某些搜索唯一相关的话题我发现后, Matlab: Plot a subplot with hold on and hold off in a loop without always calling xlabel, ylabel, xlim, etc 但是我完全不理解它。它使用父母形象,替代孩子,nextplot等我不熟悉的东西,也找不到更多的信息。
这是可以做到。请发布您的代码(或者最低工作示例),以便我们可以提出解决方案 – 2014-11-04 23:55:43