Why would openfig only show one of the .fig files (Axes)?

1 回表示 (過去 30 日間)
Hao Cheng
Hao Cheng 2019 年 3 月 11 日
コメント済み: Hao Cheng 2019 年 3 月 11 日
I have written a MATLAB GUI to draw fluorescence spectrums (attached as "Konzentrationspectrum.fig") and the curve depicting the changing spectrum's peak position with the variation of fluorescent dye concentration (attached as "Konzentration.fig").
Both figures are exported by hgsave(handles.axes1,TargetPath); and they are both 1x1 Axes. However, only one file ("Konzentration.fig") will show after being double clicked in File Explorer or being opened by openfig command. The other ("Konzentrationspectrum.fig") will only show using following command:
x=openfig('Konzentrationspectrum.fig'); f=figure;copyobj(x,f);
The figure that get imported this way also misses xlabel, ylabel and legend. So it is really annoying to run xlabel, ylabel and legend command every time I open the spectrum figure.
What are the difference between those? And can I change the way the figures are exported from GUI to make the "Kozentrationspectrum" also openable by double-clicking or openfig command?
  2 件のコメント
Adam
Adam 2019 年 3 月 11 日
What is wrong with using
doc saveas
or
doc savefig
to actually save the whole figure rather than attempting to seemingly save just an axes?
Hao Cheng
Hao Cheng 2019 年 3 月 11 日
Because the figure is from a GUI. Using savefig will save the whole buttons and control units.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by