<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260968</link>
    <title>MATLAB Central Newsreader - How to suppress figure() to bring figure to foreground?</title>
    <description>Feed for thread: How to suppress figure() to bring figure to foreground?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 16 Sep 2009 14:12:11 -0400</pubDate>
      <title>How to suppress figure() to bring figure to foreground?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260968#680550</link>
      <author>Joe Duchtel</author>
      <description>Hello -&lt;br&gt;
&lt;br&gt;
I realize that I need to use the figure() command to create a figure&lt;br&gt;
but is there any way that it will not automatically bring each figure&lt;br&gt;
to the forground if it is called for a figure that is already open?&lt;br&gt;
This happens since I run an m-file several times without closing each&lt;br&gt;
figure prior to a new run.&lt;br&gt;
&lt;br&gt;
Is there a way to get a list of all open figures?  I tried get(0) but&lt;br&gt;
the 'CurrentFigure' will only tell the currently active figure.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Joe</description>
    </item>
    <item>
      <pubDate>Wed, 16 Sep 2009 14:57:19 -0400</pubDate>
      <title>Re: How to suppress figure() to bring figure to foreground?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260968#680572</link>
      <author>nor ki</author>
      <description>Joe Duchtel &amp;lt;duchtel@gmail.com&amp;gt; wrote in message &amp;lt;cd62214e-2635-4f6d-a367-eb8fbfaef57b@o36g2000vbl.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello -&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I realize that I need to use the figure() command to create a figure&lt;br&gt;
&amp;gt; but is there any way that it will not automatically bring each figure&lt;br&gt;
&amp;gt; to the forground if it is called for a figure that is already open?&lt;br&gt;
&amp;gt; This happens since I run an m-file several times without closing each&lt;br&gt;
&amp;gt; figure prior to a new run.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is there a way to get a list of all open figures?  I tried get(0) but&lt;br&gt;
&amp;gt; the 'CurrentFigure' will only tell the currently active figure.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; Joe&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
HI Joe,&lt;br&gt;
&lt;br&gt;
h = figure('visible', 'off')&lt;br&gt;
&lt;br&gt;
get(0,'children')&lt;br&gt;
&lt;br&gt;
hth kinor</description>
    </item>
    <item>
      <pubDate>Wed, 16 Sep 2009 14:59:05 -0400</pubDate>
      <title>Re: How to suppress figure() to bring figure to foreground?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260968#680573</link>
      <author>Donn Shull</author>
      <description>Joe Duchtel &amp;lt;duchtel@gmail.com&amp;gt; wrote in message &amp;lt;cd62214e-2635-4f6d-a367-eb8fbfaef57b@o36g2000vbl.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello -&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I realize that I need to use the figure() command to create a figure&lt;br&gt;
&amp;gt; but is there any way that it will not automatically bring each figure&lt;br&gt;
&amp;gt; to the forground if it is called for a figure that is already open?&lt;br&gt;
&amp;gt; This happens since I run an m-file several times without closing each&lt;br&gt;
&amp;gt; figure prior to a new run.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is there a way to get a list of all open figures?  I tried get(0) but&lt;br&gt;
&amp;gt; the 'CurrentFigure' will only tell the currently active figure.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; Joe&lt;br&gt;
&lt;br&gt;
Hello Joe,&lt;br&gt;
&lt;br&gt;
You can use get(0, 'Children') to return all the children of the desktop.&lt;br&gt;
&lt;br&gt;
Hope this helps,&lt;br&gt;
&lt;br&gt;
Donn</description>
    </item>
    <item>
      <pubDate>Wed, 16 Sep 2009 16:12:18 -0400</pubDate>
      <title>Re: How to suppress figure() to bring figure to foreground?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260968#680594</link>
      <author>Joe Duchtel</author>
      <description>On Sep 16, 10:59&#160;am, &quot;Donn Shull&quot; &amp;lt;donn.shull.no_s...@aetoolbox.com&amp;gt;&lt;br&gt;
wrote:&lt;br&gt;
&amp;gt; Joe Duchtel &amp;lt;duch...@gmail.com&amp;gt; wrote in message &amp;lt;cd62214e-2635-4f6d-a367-eb8fbfaef...@o36g2000vbl.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hello -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I realize that I need to use the figure() command to create a figure&lt;br&gt;
&amp;gt; &amp;gt; but is there any way that it will not automatically bring each figure&lt;br&gt;
&amp;gt; &amp;gt; to the forground if it is called for a figure that is already open?&lt;br&gt;
&amp;gt; &amp;gt; This happens since I run an m-file several times without closing each&lt;br&gt;
&amp;gt; &amp;gt; figure prior to a new run.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Is there a way to get a list of all open figures? &#160;I tried get(0) but&lt;br&gt;
&amp;gt; &amp;gt; the 'CurrentFigure' will only tell the currently active figure.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; Joe&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Hello Joe,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; You can use get(0, 'Children') to return all the children of the desktop.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Hope this helps,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Donn&lt;br&gt;
&lt;br&gt;
Hello -&lt;br&gt;
&lt;br&gt;
Thanks for the information.  I determined the handles of my figures&lt;br&gt;
using the get(0, 'Children') but when I do a figure(hFigure) to make a&lt;br&gt;
certain figure my active figure, it is still moved to the foreground.&lt;br&gt;
The 'Visible' will just hide the figure and turning that back 'on'&lt;br&gt;
also moves it to the foreground.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Joe</description>
    </item>
    <item>
      <pubDate>Wed, 16 Sep 2009 16:44:50 -0400</pubDate>
      <title>Re: How to suppress figure() to bring figure to foreground?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260968#680601</link>
      <author>Rune Allnor</author>
      <description>On 16 Sep, 18:12, Joe Duchtel &amp;lt;duch...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; On Sep 16, 10:59&#160;am, &quot;Donn Shull&quot; &amp;lt;donn.shull.no_s...@aetoolbox.com&amp;gt;&lt;br&gt;
&amp;gt; wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Joe Duchtel &amp;lt;duch...@gmail.com&amp;gt; wrote in message &amp;lt;cd62214e-2635-4f6d-a367-eb8fbfaef...@o36g2000vbl.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Hello -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I realize that I need to use the figure() command to create a figure&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; but is there any way that it will not automatically bring each figure&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; to the forground if it is called for a figure that is already open?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; This happens since I run an m-file several times without closing each&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; figure prior to a new run.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Is there a way to get a list of all open figures? &#160;I tried get(0) but&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; the 'CurrentFigure' will only tell the currently active figure.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Joe&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Hello Joe,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; You can use get(0, 'Children') to return all the children of the desktop.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Hope this helps,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Donn&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Hello -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks for the information. &#160;I determined the handles of my figures&lt;br&gt;
&amp;gt; using the get(0, 'Children') but when I do a figure(hFigure) to make a&lt;br&gt;
&amp;gt; certain figure my active figure, it is still moved to the foreground.&lt;br&gt;
&amp;gt; The 'Visible' will just hide the figure and turning that back 'on'&lt;br&gt;
&amp;gt; also moves it to the foreground.&lt;br&gt;
&lt;br&gt;
Seems you have hit some OS-specific issues. I remember some&lt;br&gt;
UNIX flavours where you could specify parameters like&lt;br&gt;
PointerFocusPolicy (*), which specified if you had to click&lt;br&gt;
on a window to activate it, or just bring the mouse cursor&lt;br&gt;
on top of it. There was similar parameters like&lt;br&gt;
BringToForegroundPolicy (*), to specifiy whether the activated&lt;br&gt;
wondow shouls pop to the front or remain partially hidden&lt;br&gt;
when activated.&lt;br&gt;
&lt;br&gt;
The problem was/is that MSWindows didn't/don't have similar&lt;br&gt;
parameters: If a window is activated and visible, it pops to&lt;br&gt;
the foreground, and there is nothing one can do to prevent it.&lt;br&gt;
&lt;br&gt;
Don't expect too much from an OS that can trace its roots&lt;br&gt;
to the infamous Quick'n Dirty DOS...&lt;br&gt;
&lt;br&gt;
Rune&lt;br&gt;
&lt;br&gt;
(*) probably not correct names.</description>
    </item>
    <item>
      <pubDate>Wed, 16 Sep 2009 17:22:02 -0400</pubDate>
      <title>Re: How to suppress figure() to bring figure to foreground?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260968#680621</link>
      <author>Stephan </author>
      <description>Joe Duchtel &amp;lt;duchtel@gmail.com&amp;gt; wrote in message &amp;lt;cd62214e-2635-4f6d-a367-eb8fbfaef57b@o36g2000vbl.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello -&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I realize that I need to use the figure() command to create a figure&lt;br&gt;
&amp;gt; but is there any way that it will not automatically bring each figure&lt;br&gt;
&amp;gt; to the forground if it is called for a figure that is already open?&lt;br&gt;
&amp;gt; This happens since I run an m-file several times without closing each&lt;br&gt;
&amp;gt; figure prior to a new run.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is there a way to get a list of all open figures?  I tried get(0) but&lt;br&gt;
&amp;gt; the 'CurrentFigure' will only tell the currently active figure.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; Joe&lt;br&gt;
&lt;br&gt;
I'm not sure what you wanna do, but you can usually indicate the object in which you want to plot. If you want to plot in the (only) axis of a figure with handle fig, you could write&lt;br&gt;
&lt;br&gt;
plot(get(fig,'Children'), 1:1000)&lt;br&gt;
&lt;br&gt;
In this way the data is plotted in the correct axis without the figure being moved to the top of the screen. I usually &quot;remember&quot; the handles to axis and figures if i want to draw into them multiple times, e.g.&lt;br&gt;
&lt;br&gt;
fig1 = figure;&lt;br&gt;
ax1 = axes;&lt;br&gt;
&lt;br&gt;
etc.&lt;br&gt;
&lt;br&gt;
Hope that helps. If not, maybe post some of your code.&lt;br&gt;
&lt;br&gt;
Stephan</description>
    </item>
    <item>
      <pubDate>Wed, 16 Sep 2009 17:26:41 -0400</pubDate>
      <title>Re: How to suppress figure() to bring figure to foreground?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260968#680625</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Joe Duchtel&quot; &amp;lt;duchtel@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:8c9db9f2-45cd-46e2-9fd3-8f6ff4aaf027@p23g2000vbl.googlegroups.com...&lt;br&gt;
&lt;br&gt;
*snip*&lt;br&gt;
&lt;br&gt;
&amp;gt; Thanks for the information.  I determined the handles of my figures&lt;br&gt;
&amp;gt; using the get(0, 'Children') but when I do a figure(hFigure) to make a&lt;br&gt;
&amp;gt; certain figure my active figure, it is still moved to the foreground.&lt;br&gt;
&amp;gt; The 'Visible' will just hide the figure and turning that back 'on'&lt;br&gt;
&amp;gt; also moves it to the foreground.&lt;br&gt;
&lt;br&gt;
Yes, this is expected and documented behavior, as described in the fourth &lt;br&gt;
paragraph of the Description section of the FIGURE reference page:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
The &quot;Making a Figure Current&quot; section of that documentation describes how to &lt;br&gt;
make a figure current without changing its stacking order.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com&lt;br&gt;
comp.soft-sys.matlab (CSSM) FAQ: &lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Wed, 16 Sep 2009 19:39:18 -0400</pubDate>
      <title>Re: How to suppress figure() to bring figure to foreground?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260968#680644</link>
      <author>Joe Duchtel</author>
      <description>On Sep 16, 1:26&#160;pm, &quot;Steven Lord&quot; &amp;lt;sl...@mathworks.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &quot;Joe Duchtel&quot; &amp;lt;duch...@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; news:8c9db9f2-45cd-46e2-9fd3-8f6ff4aaf027@p23g2000vbl.googlegroups.com...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; *snip*&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks for the information. &#160;I determined the handles of my figures&lt;br&gt;
&amp;gt; &amp;gt; using the get(0, 'Children') but when I do a figure(hFigure) to make a&lt;br&gt;
&amp;gt; &amp;gt; certain figure my active figure, it is still moved to the foreground.&lt;br&gt;
&amp;gt; &amp;gt; The 'Visible' will just hide the figure and turning that back 'on'&lt;br&gt;
&amp;gt; &amp;gt; also moves it to the foreground.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Yes, this is expected and documented behavior, as described in the fourth&lt;br&gt;
&amp;gt; paragraph of the Description section of the FIGURE reference page:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.html&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; The &quot;Making a Figure Current&quot; section of that documentation describes how to&lt;br&gt;
&amp;gt; make a figure current without changing its stacking order.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; sl...@mathworks.com&lt;br&gt;
&amp;gt; comp.soft-sys.matlab (CSSM) FAQ:&lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Hello -&lt;br&gt;
&lt;br&gt;
Great ... the set(0, 'CurrentFigure', hFigure) works perfectly!&lt;br&gt;
&lt;br&gt;
Thanks a lot to everybody!&lt;br&gt;
Joe</description>
    </item>
  </channel>
</rss>

