フィルターのクリア

findall doesn't find axes object

2 ビュー (過去 30 日間)
John F
John F 2022 年 3 月 21 日
編集済み: John F 2022 年 3 月 21 日
I have an app that creates a TabGroup and inside it some tabs that contain a plot. If the specific tab exists, I would like to plot on top of the existing plot. However, when using findall to find the axes that were created but I get a 0×0 empty GraphicsPlaceholder array. What am I missing?
tabs = get(TabGroup,'Children');
tab_names = arrayfun(@(tab) tab.Title,tabs,'UniformOutput',false);
if (~ismember('Station',tab_names))
station_tab = uitab(TabGroup,'Title','Station');
station_tab.Tag = "Station";
station_tab.AutoResizeChildren = 'off';
station_ax_Tt = subplot(2,1,1,'Parent',station_tab);
station_ax_Tt.Tag = "ax_Tt";
station_ax_Pt = subplot(2,1,2,'Parent',station_tab);
station_ax_Pt.Tag = "ax_Pt";
plot_stations(station_tab,station_ax_Tt,Tt,station_ax_Pt,Pt,Nm);
else
station_tab = findall(groot,'Tag',"Station");
station_ax_Tt = findall(groot,'Tag', "ax_Tt");
station_ax_Pt = findall(groot,'Tag', "ax_Pt");
plot_stations(station_tab,station_ax_Tt,Tt,station_ax_Pt,Pt,Nm);
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by