How to enable rotation context menu when anywhere in the uiaxes plot area is right clicked?
1 回表示 (過去 30 日間)
古いコメントを表示
I am currently working in App Designer and plotting data with scatter3 which can leave a lot of the plot area empty. When I enable the rotation toolbar and right click over data, the rotation context menu pops up (Restore View, Go to X-Y view...) but when I am not over data and right click that menu does not show up. I get the following warnings:
Warning: Setting the "ContextMenu" property is not permitted while this mode is active.
> In matlab.graphics.interaction.internal/WebAxesModeWarnings/localModeWarn
In matlab.graphics.interaction.internal.WebAxesModeWarnings
In matlab.graphics.interaction.webmodes.figureModeInteractionOnEnter
In matlab.graphics.interaction.webmodes.figureModeInteractionOnEnter
Warning: Setting the "ContextMenu" property is not permitted while this mode is active.
> In matlab.graphics.interaction.internal/WebAxesModeWarnings/localModeWarn
In matlab.graphics.interaction.internal.WebAxesModeWarnings
In matlab.graphics.interaction.webmodes.figureModeInteractionOnEnter
In matlab.graphics.interaction.webmodes.figureModeInteractionOnEnter
Warning: Setting the "UIContextMenu" property is not permitted while this mode is active.
> In matlab.graphics.interaction.internal/WebAxesModeWarnings/localModeWarn
In matlab.graphics.interaction.internal.WebAxesModeWarnings
In matlab.graphics.interaction.webmodes.figureModeInteractionOnEnter
In matlab.graphics.interaction.webmodes.figureModeInteractionOnEnter
Warning: Setting the "ContextMenu" property is not permitted while this mode is active.
> In matlab.graphics.interaction.internal/WebAxesModeWarnings/localModeWarn
In matlab.graphics.interaction.internal.WebAxesModeWarnings
In matlab.graphics.interaction.webmodes.figureModeInteractionOnEnter
In matlab.graphics.interaction.webmodes.figureModeInteractionOnEnter
In matlab.graphics.interaction.webmodes.figureModeInteractionOnEnter>@(o,e)restoreAllButtonCallback(hObj,interactionData.PropertyRestoreMap,hFig)
I have tried using a post set listener on the rotation toolbar so that it sets the UIAxes context menu to a duplicate rotation context menu I created. This worked to set the context menu but when the rotation toolbar option was disabled, the UIAxes context menu could not be reset.
0 件のコメント
回答 (1 件)
Rasmita
2023 年 8 月 8 日
Hi,
It is my understanding that you want to enable rotation context menu when right clicked on the blank space of plot area, but you are getting above mentioned warnings while doing that.
There is no current workaround in MATLAB R2023a. This issue has been resolved in the prerelease for MATLAB R2023b.
In MATLAB R2023a, the warning message caused by this issue can be suppressed by executing the following command:
>>warning('off','MATLAB:modes:mode:InvalidPropertySet')
Regards,
Rasmita
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!