How can I zoom out past the default axis limits?

I just installed Matlab 2016b and have the following problem: I can't zoom out past the default axes in either direction, using the + magnifier button in a figure. I can zoom in just fine, but not out. In other words, I can't make all the data take up a tiny fraction of the plot area. Zooming past the default axes has shown hidden data on previous Matlab versions, so I would like to be able to do that still. A simple plot shows the problem:
figure;
plot([0 1], [0 1]);
Thank You

댓글 수: 1

This problem seems to have reappeared in Matlab 2023b. The workaround still works (where the panning "hand" is used first, then the zoom can be extended beyond the bounds), but it is very frustrating to have this problem reappear.

댓글을 달려면 로그인하십시오.

답변 (3개)

the cyclist
the cyclist 2017년 1월 13일

3 개 추천

I don't recall it being the case that you could zoom out beyond the original axes size, actually.
You could always do it programatically, e.g. by
xlim([-10 10])
ylim([-10 10])

댓글 수: 4

Thanks. Normally you don't need to go past the auto limits, but it helps when auto limiting loses data points in the edge of your figure, as I've seen occasionally.
I checked, and versions R2012 and R2015 do allow you to zoom out of the automatic axes. I just can't get R2016b to do it yet.
I am having the same problem with 2016b. Unfortunately to save disk space i uninstalled 2016a which didn't have this problem. Any solutions yet?
Mike
Mike 2018년 1월 8일
I find this change rather disappointing. It seems I will now have to use xlim & ylim frequently when I used to just lasso the region of interest. Please TMW, reinstate the ability to zoom beyond the original settings.
One simple yet annoying band aid is to use hand tool to move the figure a little; then the axes are freed up for zooming, until you reset them by something like double clicking in zoom.

댓글을 달려면 로그인하십시오.

Mark Elwell
Mark Elwell 2019년 7월 29일

0 개 추천

Yes, I also quickly noticed this very annoying change in the zoom functionality. Matlab basically screwed up. I don't use the newer versions so hopefully this mistake was removed afer 2016b.
Mark Elwell
Mark Elwell 2019년 8월 5일

0 개 추천

I accidentally discovered the solution. It only involves an extra mouse click or two:
  1. plot as usual
  2. click the drag icon; then quickly drag the (inner) plot; the amount doesn't matter, it just has to move
  3. NOW, the zoom will work as it did in days of old ... you can zoom out as much as you want, just like before
  4. If you double-click the plot to reset the view back to the original, you then lose the new zoom capability, meaning you have to go back to step (2) ! (this is the case for 2016b)

댓글 수: 4

As mentioned above, in 2018. But keep trying!
Olivier Sauter
Olivier Sauter 2020년 6월 28일
편집: Olivier Sauter 2020년 6월 28일
Thanks, it must be a bug in the zoom since once you drag it is fine... May be reporting as bug report will lead to better behavior in next releases...
Paul Quinn
Paul Quinn 2020년 6월 30일
편집: Paul Quinn 2020년 6월 30일
Brilliant change of tack, Oliver!
I'll look into this. Never filed a bug report before...DONE.
Let's see what they do...
Good news! Support was able to replicate the 2016a -> 2016b change in behavior, though they had to run 2016a under Win7 to get the old behavior. They say they will submit the change to the Development Team. Yay!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Data Exploration에 대해 자세히 알아보기

태그

질문:

2017년 1월 13일

댓글:

2024년 1월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by