Is it possible to add Plot Edit Toolbar functionality to a GUI?
Mostrar comentarios más antiguos
I am creating a data visualization GUI, and I'd like to add the ability for the users to annotate the plots as they wish. The 'Plot Edit Toolbar' menu option would be perfect.
Any help would be appreciated!
Respuesta aceptada
Más respuestas (1)
Jan
el 11 de Jul. de 2011
The toolbar of a figure is disabled, if an UICONTROL is created. But you can enable it manually:
figure('Toolbar', 'figure');
uicontrol('Style', 'Pushbutton');
Or if you use GUIDE to create the figure, you can enable the toolbar in the CreateFcn also.
6 comentarios
Fangjun Jiang
el 11 de Jul. de 2011
Nice, Jan. Where did you get that?
Jan
el 11 de Jul. de 2011
E.g. from the PLOTEDIT function. See also : http://undocumentedmatlab.com/blog/uicontrol-side-effect-removing-figure-toolbar/
Matthew Schroeder
el 12 de Jul. de 2011
B_Richardson
el 12 de Jul. de 2011
I am trying to do something very similar let me know if you come up with a solution!
mechE
el 19 de Jun. de 2019
Please post the solution
This is working for me. In your guide, right click on your figure (outside the plots)--> view callbaks--> Create Fcn. Then in the function created in your .m file add the code as below:
%%%%%
function figure1_CreateFcn(hObject, eventdata, handles)
% hObject handle to figure1 (see GCBO)
set(hObject ,'Toolbar','figure');
%%%%%
This sentence also works (I don't see the difference): set(hObject,'Menubar','figure');
Categorías
Más información sobre Interactive Control and Callbacks en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!