Can I hade the Figure toolbar without hiding the Axes toolbar?
Afficher commentaires plus anciens
MATLAB 2025b.
I am working on a small and simple MRI image viewer. I am creating a Figure to view the images, and adding mouse-based controls for window/level, pan, zoom, etc.
Is there a way to hide the Figure toolbar (circled in red) without losing the Axes toolbor (circled in green)? (I realize the Axes toolbar only appears when the pointer hovers over the axes.)

If I wait till the figure is created and use hF.ToolBar='none', the Figure toolbar disappears and the Axes toolbar stays. This is what I want. However, I cannot figure out how to accomplish the same thing while creating the figure. If it matters, the figure is created inside a handle class method.
Thanks in advance.
Réponses (1)
Matt J
le 20 Mar 2026 à 18:12
figure(Toolbar='none')
2 commentaires
Matthew
le 20 Mar 2026 à 21:06
The axes toolbar is not visible because the figure has been freshly created and you haven't created any axes yet, or if you have, you have not yet hovered over the axes toolbar with the mouse. That will always be true, unfortunately. There is no way to instantiate an axes with its toolbar visible from the get-go, nor to keep it permanently visible after moving the mouse out of the axes boundaries.
Catégories
En savoir plus sur Graphics Object Properties dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!