Is it possible to programmatically suppress figure roll-over menu (zoom, rotate, etc)?

조회 수: 5 (최근 30일)
When a Matlab Figure is open, a roll-over graphical menu appears when the cursor is in a certain area. (See image. Suppress the contents of the red box.) Is it possible to programmatically suppress it regardless of cursor position? If so, how?

채택된 답변

Bruno Luong
Bruno Luong 2023년 7월 28일
ax = gca; % your axe handle if you can get it other than gca
set(ax,'Interactions',[])
  댓글 수: 2
Robert
Robert 2023년 7월 28일
set(gcf,'ToolBar','none');
also works, thanks.
Bruno Luong
Bruno Luong 2023년 7월 28일
Not exactly the same it removes also the figure toolbar which is not the axes interactive icons you hightlight and appears when the mouse hanging over this area (what an anoying feature IMO).

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

추가 답변 (2개)

Davide Masiello
Davide Masiello 2023년 7월 28일
편집: Davide Masiello 2023년 7월 28일
This should work, but it also suppresses the fixed toolbar above the figure
f = figure;
f.ToolBar = 'none';
  댓글 수: 1
Robert
Robert 2023년 7월 28일
This didn't work, but now knowing what the thing is called, I found that
set(gcf,'ToolBar','none');
does work, thanks.

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


Voss
Voss 2023년 7월 28일
From Axes Properties documentation:
Data exploration toolbar, which is an AxesToolbar object. The toolbar appears at the top-right corner of the axes when you hover over it.
The toolbar buttons depend on the contents of the axes, but typically include zooming, panning, rotating, data tips, data brushing, and restoring the original view. You can customize the toolbar buttons using the axtoolbar and axtoolbarbtn functions.
If you do not want the toolbar to appear when you hover over the axes, set the Visible property of the AxesToolbar object to 'off'.
ax = gca;
ax.Toolbar.Visible = 'off';
For more information, see AxesToolbar Properties.

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by