matlab - Hold on only the axis, not the data -
matlab - Hold on only the axis, not the data -
i want graph fixed axes , plot info 1 one. known, if utilize hold off remove first set of data, forgets limits on axes , automatically assigns new limits sec set of data. somehow possible maintain axes same each time separate info piece plotted in same figure?
code is:
figure(4) grid on axis([xl yl zl]) j = 1:n % n amount of info sets = 1:2 % 2 items drawn per info set *plot data* hold on end %this part has done every iteration 1 time again in order create work axis([xl yl zl]) xlabel = ... ylabel zlabel title pause(tstop) hold off end
after searching relevant topic found was; matlab: plot subplot hold on , hold off in loop without calling xlabel, ylabel, xlim, etc not understand @ all. uses parent figure, replacechildren, nextplot , such not familiar , cant find much info about.
here's illustration can adapted needs:
xlim([0 10]) %// set x-axis limits ylim([0 10]) %// set y-axis limits set(gca,'nextplot','replacechildren') %// prevent axis limits changing %// each new plot plot(3:8,3:8); %// note axis limits kept [0 10] pause(1) plot(5:7,5:7); %// note axis limits kept [0 10]
matlab animation figures
Comments
Post a Comment