我希望我的圖形能夠固定座標軸,並且還可以逐個繪製數據。所有的東西都是已知的,但是如果我使用暫停來移除第一組數據,它也會忘記軸上的限制並自動爲第二組數據分配新的限制。 是否有可能在每次將單獨的數據塊繪製在同一圖中時保持座標軸一致?僅保留座標軸,而不保存數據
現在的代碼是:
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