Info

この質問は閉じられています。 編集または回答するには再度開いてください。

i have a GUI with a button. when the button is pressed the it will plot a graph. How do i make the figure not in the GUI window? how to make it in separate Figure?

1 回表示 (過去 30 日間)
Hazman Hatta
Hazman Hatta 2016 年 1 月 19 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日

回答 (1 件)

Geoff Hayes
Geoff Hayes 2016 年 1 月 19 日
Hazman - create a new figure before calling plot. For example,
figure;
plot(x,y);
  2 件のコメント
Hazman Hatta
Hazman Hatta 2016 年 1 月 19 日
it works, Thank you so much Geoff
Geoff Hayes
Geoff Hayes 2016 年 1 月 19 日
Glad it worked out, Hazman. Most likely what was happening is that the call to plot tries to plot the data to the current axes. Your GUI, which appears to have been created programmatically, would be the current figure. So the current axes would be within the current figure and that is where your data would be drawn.

Community Treasure Hunt

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

Start Hunting!

Translated by