Home Insert figure into uipanel in Matlab
Reply: 0

Insert figure into uipanel in Matlab

user1153
1#
user1153 Published in June 23, 2018, 2:29 am

I have a parent figure on which I placed tabs with uitabgroup. Each tab contains two panels. Each panel has an axes handle. I want to be able to print plotted results from either panel on any tab. Is it possible to insert a figure object into the panel with something like:

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');

Can I make hFig a 'child' of panelA?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.313664 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO