Plotting within GUI creates figure, removes other UIs

My GUI uses radio buttons to switch between figures; however, when a radio button is selected, it opens a new figure with the plot and closes the GUI form. The radio buttons call external script files - is this perhaps the cause of the problem? The following is the code for the radio buttons:
switch get(eventdata.NewValue,'Tag')
case 'Envo1'
Environ1
case 'Envo2'
Environ2
case 'Envo3'
Environ3
case 'Envo4'
Environ4
case 'Envo5'
Environ5
end
Within the script files is simply variable definitions and plot commands. I have other radio buttons on the form that I would like to use to further add to the plot created by these radio buttons, but it isn't working so well when the radio buttons aren't plotting to the figure on the form. Any advice or direction towards where the issue may be is greatly appreciated!

 採用された回答

Image Analyst
Image Analyst 2014 年 3 月 13 日

2 投票

Examine all your external scripts and gui m-file code for the line:
close all;
It sounds like at some point you're calling that.

1 件のコメント

Kirsten
Kirsten 2014 年 3 月 14 日
編集済み: Kirsten 2014 年 3 月 14 日
I was using clf, but replacing that with cla made everything better. You may actually be able to save my project from me. Thank you!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGraphics Objects についてさらに検索

製品

質問済み:

2014 年 3 月 9 日

編集済み:

2014 年 3 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by