Change Default Behavior of the Zoom

33 vues (au cours des 30 derniers jours)
Anael
Anael le 10 Oct 2016
Commenté : jkr le 29 Juil 2022
It looks like in R2016b the default zoom action is to change the axis limits, which results in "cropping" the 3D objects while maintaining the axes fixed.
I find the old behavior better for me. I can change it for each figure with right click>Camera Pan and Zoom, but I would like to change the default setting permanently. What is the value to edit?
Thank you.
  3 commentaires
Anael
Anael le 6 Mar 2017
This is not what i wanted but it's a cool feature to keep the context around what i'm zooming on!
jkr
jkr le 29 Juil 2022
I would like to make 'xon' the default for both panning and zooming. It makes best sense to me for time oriented work. There is a reference below to factory settings, but I do not find what I want there. Anyone know where I can set these defaults?

Connectez-vous pour commenter.

Réponse acceptée

Anael
Anael le 6 Mar 2017
It turns out there is no 3DPanAndZoomStyle property to the Axes objects so I couldn't set a Root default behavior. I ended up adding the line below after each 3D plot call.
setAxes3DPanAndZoomStyle(zoom(gca),gca,'camera')
This function calls the folowing: matlab.graphics.interaction.internal.setAxes3DPanAndZoomStyle(hThis.FigureHandle,hAx,ver3d); which goes to deep for me...
Below are the notes on the version history:
3-D Pan and Zoom: Explore data with improved pan and zoom behavior for axes in a 3-D view For axes in a 3-D view, panning and zooming now shift the view of the data by modifying the axis limits, instead of moving the entire axes. The axes box stays in the same location within the figure. Previously, panning and zooming modified camera properties, which moved the entire axes around within the figure. Compatibility Considerations If you have an axes in a 3-D view, then the behavior of pan and zoom is different. For the old behavior, use one of these options: Use the context menus when in pan or zoom mode. For example, when you are in zoom mode, right-click over the axes and select 3D Options > Camera Pan and Zoom. Use the setAxes3DPanAndZoomStyle function to specify the behavior, for example: ax = gca; z = zoom; setAxes3DPanAndZoomStyle(z,ax,'camera') Use the camera toolbar. To view the camera toolbar, select View > Camera Toolbar from the figure menu.

Plus de réponses (1)

Steven Lord
Steven Lord le 11 Oct 2016
You prefer the behavior specified by the 'rectangle' value for the ClippingStyle axes property? You can change the default value for that property on groot using the instructions on this documentation page.
  4 commentaires
Matt J
Matt J le 7 Jan 2017
I'm wrestling with the same issue. Was there any conclusion to this? "Axes3DPanAndZoomStyle" does not appear to be the name of a groot property that you can set, so it is not clear to me how Steve's advice applies.
Josh Philipson
Josh Philipson le 19 Juin 2019
Matt J, I am also working on this..did you figure it out?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Graphics Object Properties dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by