subplot to specific figure
43 次查看(过去 30 天)
显示 更早的评论
How do you ensure a subplot is always on a particular figure that is open.
My figure is assigned>:
hFig=figure('Position',[400 200 1200 600]);
movegui(hFig,'center')
sometime if I touch my GUI, it will plot to an axes on the gUI and not the figure hFig as requested. So I want to force it, I thought the following should work:
hFig;
h1=subplot(2,2,1);
I also add text when I create mt figure that is displayed un til the subplot is plotted then it goes. I do use hold on; How can I have text permanently on (here is my text command)
hFig=figure('Position',[400 200 1200 600]);
movegui(hFig,'center')
axes('position',[0.0,0.0,1,1],'visible','off');
text(0.1,0.05,['folder=',folder],'Fontsize',8,'Interpreter','none');
hold on;
0 个评论
采纳的回答
Orion
2014-11-24
Hi,
you can do
set(0,'CurrentFigure',hFig) % you say to Matlab to make hFig thecurrent figure
h1=subplot(2,2,1);
...
2 个评论
Sebastian Baur
2022-8-29
I know this is way too late to answer to the OP, but here is the way I prefer doing this:
h1 = subplot(2, 2, 1, 'Parent', hFig);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!