Change Default Behavior of the Zoom

25 ビュー (過去 30 日間)
Anael
Anael 2016 年 10 月 10 日
コメント済み: jkr 2022 年 7 月 29 日
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 件のコメント
Anael
Anael 2017 年 3 月 6 日
This is not what i wanted but it's a cool feature to keep the context around what i'm zooming on!
jkr
jkr 2022 年 7 月 29 日
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?

サインインしてコメントする。

採用された回答

Anael
Anael 2017 年 3 月 6 日
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.

その他の回答 (1 件)

Steven Lord
Steven Lord 2016 年 10 月 11 日
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 件のコメント
Matt J
Matt J 2017 年 1 月 7 日
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 2019 年 6 月 19 日
Matt J, I am also working on this..did you figure it out?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGraphics Object Properties についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by