How can I add "Edit plot" to tool bar in my own GUI
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (4)
Azzi Abdelmalek
il 26 Apr 2013
Modificato: Azzi Abdelmalek
il 26 Apr 2013
In your gui figure there is an icone called toolbar editor, click on it and add zoom in and zoom out
0 Commenti
aJackal
il 28 Feb 2017
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 Commenti
Sjouke Rinsma
il 27 Nov 2019
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 Commenti
Vedere anche
Categorie
Scopri di più su Data Exploration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!