Matlab 2025 axes zoom error when the x axis is scaled differently.
10 views (last 30 days)
Show older comments
Hi all,
When I run this code on matlab 2025a, both plots look the same. However, when I use the zoom tool (by just clicking somewhere in the middle of the plot), then the axis line of the right plot displays over everything else.
% make bad graph
a = randn(1,1000);
fs = 5e7;
figure
tiledlayout(1, 2);
nexttile;
plot( a);
nexttile;
t = (0:length(a) - 1)/fs;
plot( t, a);
Here is a screenshot:

Notice the line spilling onto the y-axis on only the right plot, but the left plot is properly cropped after zooming.
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Graphics Object Programming 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!