I´m trying to make a matlab movie using a semilogy bar plot but my axis keep changing for every new value eventhough I´m using the axis-cmd. Code-example: My input signal u is the energy in different frequency areas, and has 100 values for every time step.
fs = 22050
x_min = 0;
x_max = 22100;
y_min = 0;
y_max = 10^4;
for i = 1:length(u)
bar(fs/100:fs/100:fs,u(i,:));
set(gca,'YScale','log')
axis([x_min x_max y_min y_max])
drawnow
frame = getframe(gcf);
writeVideo(v,frame);
end
For every new frame the axis keeps changing and I haven´t found any answer when googling the issue. Help is much appreciated.

u(i,:)? How arex_min x_max y_min y_maxdefined? - il_raffa