How do I load a fig file into a GUI?
古いコメントを表示
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 件のコメント
Adam
2016 年 8 月 3 日
A .fig contains a figure. You can't load a figure into an axes or indeed anywhere into another figure.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!