How can I add "Edit plot" to tool bar in my own GUI
11 次查看(过去 30 天)
显示 更早的评论
Hi ! I would like to create a GUI with and axes. Axes should have zoom in, zoom out, rotate , pan and normal white arrow which is "Edit plot". To get four this feauters it is enough to click GUIDE "Tollbar Editor" and just add zoom in, pan etc. BUT there is nothing like normal white arrow "Edit plot".I don't want to have all "edit plot" toolbar. I just have interactive plot (user can change position of the point) and I would like user to zoom in, zoom out , pan and then come back to normal arrow again to allow him to interact with plot.
I can write in code viewmenufcn('FigureToolbar'); BUT it give me all toolbar with such buttons like "save" etc. When User click to that "save" button all Matlab crashed totally.
I tried to modify viewmenufcn('FigureToolbar'); in code but its over my programming skill ;)
Please help me :) Janek
0 个评论
回答(4 个)
Azzi Abdelmalek
2013-4-26
编辑:Azzi Abdelmalek
2013-4-26
In your gui figure there is an icone called toolbar editor, click on it and add zoom in and zoom out
0 个评论
aJackal
2017-2-28
I don't think it's possible using GUIDE. However, I found a tutorial showing you how to disable certain items from other default toolbars. So, you could enable the figure toolbar, and then hide the 'save' button.
I have added the following in MyGui_OpeningFcn: %set(hObject,'toolbar','figure');%not needed if you turn the toolbar in guide property inspector a=findall(handles.FigureToolBar,'ToolTipString','Save Figure'); set(a,'Visibility','Off')
Where you can replace 'Save Figure' with the other tool buttons you want to disable. The easiest way to find their tags is to hover the mouse over the button.
Good luck!
https://ch.mathworks.com/matlabcentral/answers/100561-how-do-i-customize-a-figure-toolbar-by-removing-certain-buttons
0 个评论
Sjouke Rinsma
2019-11-27
So, I ended up here with the same question, and after some digging around found you can use below function to enable (or disable with 'off') figure editing:
plotedit(fig_handle, 'on');
Just draw your own white arrow toggle icon and add to the code :)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Exploration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!