How to permanently hide the toolbar for an axes even after replotting
61 views (last 30 days)
Show older comments
I've done a lot of searching and I can't seem to find a way to disable showing the axes toolbar. There are some options that work such as turning the toolbar visibibility off or using the axtoolbar function, but they are temporary. What's the official way of telling a specific axes to stop creating the toolbar?
2 Comments
Hitesh
on 20 Sep 2024 at 6:49
Hi Jim Hokanson,
You can try below command:
fig = figure('Toolbar', 'none');
However, this will prevent all toolbars from being generated, including the axes toolbar.
Answers (1)
Voss
on 20 Sep 2024 at 4:51
You can delete it, e.g.:
delete(gca().Toolbar)
4 Comments
Voss
on 21 Sep 2024 at 1:27
Use low-level graphics functions such as line, surface, and patch, rather than their high-level counterparts such as plot, surf, and fill. Low-level functions won't cause the axes toolbar to reappear.
See Also
Categories
Find more on Data Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!