简体   繁体   English

Matlab gui uiwait将新图形隐藏在当前图形后面

[英]matlab gui uiwait hide the new figure behind the current one

I have two figures. 我有两个数字。 In figure 1 m file, I write run figure 2.m uiwait(figure1); 在图1 m文件中,我编写运行图2.m uiwait(figure1);。

Then in figure 2, after some process, I write uiresume(figure1) 然后在图2中,经过一些过程,我编写uiresume(figure1)

The thing is that after matlab run figure 2, the figure flashes and hide behind figure 1. I need to move figure 1 and then operate on figure 2 which is very inconvenient. 问题是在matlab运行图2之后,该图闪烁并隐藏在图1后面。我需要移动图1,然后在图2上进行操作,这非常不方便。 Can anyone help me to fix this? 谁能帮我解决这个问题?

Use figure . 使用figure Here's an example: 这是一个例子:

h1 = figure; %// create figure 1
plot(1:5, 'o');
h2 = figure; %// create figure 2
plot(ones(1,5), '*');

Now the first figure is behind the second. 现在,第一个数字落后于第二个。 To bring the first figure forward (make it the current figure), use 要使第一个图形向前(使其成为当前图形),请使用

figure(h1)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM