How do I load a fig file into a GUI?
Mostrar comentarios más antiguos
Dear all,
I have created a very simple GUI: one push button and one axes. When I press the push button, I want to open a dialog box, select a *.fig file and load it into the axes.
So, here is the piece of code I have in the callback of my push button:
[handles.my_file_name, handles.my_pathname]=uigetfile('C:\Users\Matlab\data_examples\*.fig','Select the figure file');
axes(handles.myPlot1); %myPlot1 is the name of my axes
openfig(handles.my_file_name);
When I run it, it opens the figure outside the my GUI. It loads it in a new figure.
I guess I'm missing something quite simple there, but I cannot figure it out. I would appreciate any help.
-Bests -
1 comentario
Adam
el 3 de Ag. de 2016
A .fig contains a figure. You can't load a figure into an axes or indeed anywhere into another figure.
Respuestas (0)
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!