在Matlab中将图形插入uipanel

时间:2018-01-11 12:43:04

标签: matlab graphics tabs figure

我有一个父图,我用uitabgroup放置了标签。每个选项卡包含两个面板。每个面板都有一个轴柄。我希望能够在任何选项卡上从任一面板打印绘制结果。是否可以将图形对象插入面板中,例如:

hTabGroup               = uitabgroup('Parent', parent); 
% parent here is the main GUI figure as gcf passed in
set( hTabGroup, 'position', [ 0.35, 0.005, 0.6, 0.234] );
hTabs(1)                = uitab('Parent', hTabGroup, 'Title', 'A');
hTabs(2)                = uitab('Parent', hTabGroup, 'Title', 'B');
hTabs(3)                = uitab('Parent', hTabGroup, 'Title', 'C');

panelA              = uipanel('Parent',hTabs(1),...
    'Position',[0.00    0.0050    0.500    0.9750], ...
    'Title', 'fuel burn vs. distance' );

panelB                 = uipanel('Parent',hTabs(1),...
    'Position',[0.50    0.0050    0.500    0.9750] );

panelAxesA                = axes( 'Parent', panelA );
set( panelAxesA, 'position', [0.100    0.25    0.85    0.7 ] );

hFig = figure('Menubar', 'none');

我可以让hFig成为panelA的'孩子'吗?

1 个答案:

答案 0 :(得分:0)

figure对象的root object只能parent