Don't use zoom. Use XLim and YLim to control the viewable region. That will let you set its boundaries exactly as you like them.
Using zoom with rectangle cuts of area
9 次查看(过去 30 天)
显示 更早的评论
In an application, I am using the zoom function to enable zooming by user interaction.
Sometimes when using the rectangular click & drag region I run into the problem, that the zoomed imag cuts off parts of the box's content. When the ratio of the box and the axes are not the same it makes sense that the zoomed imaged cannot contain exactly the selected region. But I would prefered it in that case that the zoomed image would add some padding around the selection to fit into the axes instead of cutting parts away. In other words, the zoomed image should always contain AT LEAST the selected region, if necessary it can show more but never less.
The behaviour occures in R2022b, in an older version of the same application running in R2015b I never had the problem. Is there any way to make the zoom box to behave as I want it to?
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Exploration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!