Use
that you want before beginning the iteration.
Didn't read carefully enough, sorry...you're using mutually exclusive commands and the last in effect are those from axis...
doc axis
...
axis tight sets the axis limits to the range of the data and sets the
XLimMode, YLimMode, and ZLimMode properties to auto.
Use axis tight manual to set the limit mode properties to manual.
...
So, right after you set the z-axis limit manually your overwrite it and set it back to 'auto' with the axis tight call.
Try something more like...
for i = 1:4
hAx(i)=subplot(1, 4, i);
surf(x, y, errPreStore{i});
end
set(hAx,'zscale','log')
axis(hAx,'square')
axis(hAx,'tight', 'manual')
set(hAx,'zlim',axi_lim)
which results in
Best Answer