|
I want to divide a figure into two panels, and I want axes in the two panels that are clipped to the extent of the panel. However when I code it as
fig=figure;
hpMesh = uipanel('Parent',fig,'Title','Structure','FontSize',12,...
'BackgroundColor',[0.6, 0.5, 0.9],...
'Position',[0.51, 0.01, 0.44, 0.98], 'Clipping','on');
hMesh=axes('position',[0.1, 0.1, 0.8, 0.8],'Parent',hpMesh, 'Clipping','on');
hpDisplays = uipanel('Parent',fig,'Title','Monitoring','FontSize',12,...
'BackgroundColor', [0.6, 0.5, 0.9],...
'Position',[0.01, 0.01, 0.49, 0.98], 'Clipping','on');
hKE=subplot('position',[0.19, 0.1, 0.78, 0.35],'Parent',hpDisplays);
hmu=subplot('position',[0.19, 0.55, 0.78, 0.35],'Parent',hpDisplays);
the plotting in all the axes sticks out from the panel and is not be clipped by it. Should I do something differently, or is this a bug?
Thanks,
Peter
|