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 commentaire

Adam
Adam le 3 Août 2016
A .fig contains a figure. You can't load a figure into an axes or indeed anywhere into another figure.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Centre d'aide et File Exchange

Commenté :

le 3 Août 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by