Can I put a subplot within a GUI axes?

I have a basic GUI I created with Guide. Within my GUI, I have a couple axes, one where I play a video, and another where I plot some related data. I'd like to plot the data using subplots, but I want to contain it within the data axes. Whenever I use the subplot command, the data is plotted across the entire GUI figure window.
Is it possible to contain the subplots within the axes, or otherwise prevent it from taking up the entire GUI window?

 採用された回答

Walter Roberson
Walter Roberson 2016 年 1 月 26 日

6 投票

subplot() are axes, and axes cannot be contained within axes. You can construct the axes with whatever Position property is appropriate. You can construct multiple such axes.
What you would probably find easiest is to create a uipanel and plot entirely within the uipanel.
panhandle = uipanel('Position', ....);
pax11 = subplot(2,2,1,'Parent', panhandle);
pax12 = subplot(2,2,2,'Parent', panhandle);
...
handles.panhandle = panhandle;
handles.pax11 = pax11;
handles.pax12 = pax12;
...
guidata(hObject, handles);
Or you can construct the uipanel and axes in GUIDE ahead of time.

1 件のコメント

Miles Stephenson
Miles Stephenson 2016 年 1 月 27 日
That works, thank you!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by