Matlab zoom window behavior in recent years

조회 수: 6 (최근 30일)
Todd Welti
Todd Welti 2021년 3월 7일
댓글: Donald Guy 2021년 5월 5일
I don't remember which version this started, but in recent 4 or 5 years, I have noticed an annoying "feature" of the figure zoom window. You try to drag a window over the part of the figure you want to zoom in on, but there is some sort of "snap" behaviour that tries to "help" you place the window. It prevents for example small window, i.e. it wants to snap to 0 width if you try to make a small zoom window. So you have to make the zoom window larger than maybe you wanted, and do 2 zooms to get there. I have searched a bit and dont see how to change this easily. In a similar vein, you can't seem to zoom outside the limits of the data plotted. For example if I want to zoom in on the srat of an impulse response, I would like the left part of the zoom window to be just slightly before the start of the impulse response. No can do it seems.
  댓글 수: 3
Todd Welti
Todd Welti 2021년 5월 5일
Yes. You can zoom out af far as possible, then pan I guess, but it is anoying. There must be a undocumented way of getting around this!!
Donald Guy
Donald Guy 2021년 5월 5일
I will admit that sometimes, an initially off-putting aspect of new plotting & window behavior has proven to be useful to me. And there are so many users with different preferences that it seems unlikely that one set of behaviors will be ideal for everyone.
But one thing has been consistent from my experience: I use zoom a lot in casual plotting (most often dragging to select a box region), and I value speed and a minimum of moving the mouse to push buttons to get in and out of modes (such as the zoom out, then pan, then zoom again pain that was mentioned). The relatively recent changes (e.g. making the zoom buttons apply to axes instead of figures) all seem to lead to a lot more of this.
I found this workaround slightly useful (because with a big plot the default interactivity generally gets in my way)
ax = gca; disableDefaultInteractivity(ax)
But it would be much more useful to know how this could be made the default for all figures that are created in my session.
Is there something similar that can be done in a startup.m file to customize defaults for user preferences?
Whould this 11 year old example (grid lines as a default) still be a valid approach?

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

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2021년 5월 5일
That is true but I think there is a benefit. It allows you to do x-only or y-only zoom easily.
Regarding zoom outside of the limit, you just need to start the first point inside the limit. For example, if you want to zoom from the start, you need to draw the window, starting from the top-right corner first and then move towards low-left, and you can place the corner outside of the limit (axes).
  댓글 수: 1
Todd Welti
Todd Welti 2021년 5월 5일
True but not if there is no data there. So , often I am looking at an impulse response. i like to have the zoom larger than the extents of the data. Just makes it easier to see the start for example. Might sound wierd, but I just like having the freedom to zoom however I want and not be constrained.

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

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by