Matlab zoom window behavior in recent years

5 views (last 30 days)
Todd Welti
Todd Welti on 7 Mar 2021
Commented: Donald Guy on 5 May 2021
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 Comments
Todd Welti
Todd Welti on 5 May 2021
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 on 5 May 2021
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?

Sign in to comment.

Answers (1)

Fangjun Jiang
Fangjun Jiang on 5 May 2021
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 Comment
Todd Welti
Todd Welti on 5 May 2021
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.

Sign in to comment.

Categories

Find more on Visual Exploration in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!