Surface plot with semilog z-axis: how to keep the same axis limit for iterative plots?
Show older comments
Hi all,
I have an algorithm which generates 4 surfaces iteratively. I'd like to set the z-axis to semilog scale and keep the same z-axis limit for all iterations. Here is the code:
x = 1:5;
y = 1:5;
axisLim = 0.0007;
for i = 1:4
subplot(1, 4, i)
surf(x, y, errPreStore{i});
axi_lim = [0, axisLim];
zlim(axi_lim)
axis tight
axis square
set(gca, 'ZScale', 'log');
end
However from the surface plot you can see that the z-axis does not remain the same for these 4 plots. How can I fix it? I've attached the test.mat file so you can import and plot.
Thanks!

Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
