comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: idl plot window disappearances
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: idl plot window disappearances [message #77309] Wed, 24 August 2011 07:51
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
R.G. Stockwell writes:

> What it seems like is that IDL is assuming there are no other windows
> present, or that at least that the IDL related windows are all in the 'next'
> alt-tab queue.

I'm sure they assumed, when IDL ballooned up from
30K of process space to 30,000K, that IDL would
be the only application running on your computer. ;-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: idl plot window disappearances [message #77310 is a reply to message #77309] Wed, 24 August 2011 07:30 Go to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
>
>
> "David Fanning" wrote in message
> news:MPG.28be1052804d190e989968@news.giganews.com...
>
> R.G. Stockwell writes:
>
>> I suspect it is a specific and predictable application that is being
>> brought
>> up.
>>
>> Bring the IDLDE up front. Hit alt-tab and hold it down (keep the alt
>> key
>> pressed), so you have the little box showing you the icons of all the
>> active
>> programs. Then, while keeping the alt key down, hit esc to cancel the
>> alt-tab window. That will show you the order of all the windows that
>> exist.
>> This random app, is always the one in the second spot, assuming IDLDE is
>> the
>> first spot. Then, type wshow (IDLDE is still active) and bammo, the
>> IDL
>> gets moved to the spot of window0, and what was in the second spot (in
>> the
>> alt-tab window) is the new application.
>>
>> That is the error in wshow. it is moving the current window to the
>> idlwindow0 position (and it should do it the other way around, move the
>> idlwindow0 position to the current window position). maybe :)
>
> Well, I don't know. Following your directions, I can't make
> it pull up another application at all, but I sure have seen
> that happen. I'm using the Windows 8.1 version, is that what
> you are using?
>
> You may be on the right track though, because creating a
> widget program before calling WShow might rearrange the
> order of windows enough to put the graphics window in
> the right position occasionally.
>
> I'm pretty sure you have done more research on this
> topic than ITTVIS. Maybe you should contact them. :-)

ha, it was about 5 minutes, so that might be true.

What it seems like is that IDL is assuming there are no other windows
present, or that at least that the IDL related windows are all in the 'next'
alt-tab queue.

cheers,
bob
Re: idl plot window disappearances [message #77314 is a reply to message #77310] Tue, 23 August 2011 19:30 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
R.G. Stockwell writes:

> I suspect it is a specific and predictable application that is being brought
> up.
>
> Bring the IDLDE up front. Hit alt-tab and hold it down (keep the alt key
> pressed), so you have the little box showing you the icons of all the active
> programs. Then, while keeping the alt key down, hit esc to cancel the
> alt-tab window. That will show you the order of all the windows that exist.
> This random app, is always the one in the second spot, assuming IDLDE is the
> first spot. Then, type wshow (IDLDE is still active) and bammo, the IDL
> gets moved to the spot of window0, and what was in the second spot (in the
> alt-tab window) is the new application.
>
> That is the error in wshow. it is moving the current window to the
> idlwindow0 position (and it should do it the other way around, move the
> idlwindow0 position to the current window position). maybe :)

Well, I don't know. Following your directions, I can't make
it pull up another application at all, but I sure have seen
that happen. I'm using the Windows 8.1 version, is that what
you are using?

You may be on the right track though, because creating a
widget program before calling WShow might rearrange the
order of windows enough to put the graphics window in
the right position occasionally.

I'm pretty sure you have done more research on this
topic than ITTVIS. Maybe you should contact them. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: idl plot window disappearances [message #77315 is a reply to message #77314] Tue, 23 August 2011 19:05 Go to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
>
>
> "David Fanning" wrote in message
> news:MPG.28bddc7d625698a5989967@news.giganews.com...
>
> R.G. Stockwell writes:
>
>>> This command does nothing. But, if I do this:
>>>
>>> xcolors
>>> wshow
>>>
>>> The window 0 pops forward!! This works about
>>> 25% of the time and for God only knows what
>>> reason. :-)
>>
>> I have done this a couple of times (in an existing IDL session) but what
>> I
>> see is that I can create the window, then put "another app" in front of
>> it,
>> then select the IDLDE to type wshow, then wshow will bring that "other
>> app"
>> to the front.
>
> Oh, yeah, I forgot to mention that 25% of the time
> some other application comes to the front when you
> type WShow!!

I suspect it is a specific and predictable application that is being brought
up.

Bring the IDLDE up front. Hit alt-tab and hold it down (keep the alt key
pressed), so you have the little box showing you the icons of all the active
programs. Then, while keeping the alt key down, hit esc to cancel the
alt-tab window. That will show you the order of all the windows that exist.
This random app, is always the one in the second spot, assuming IDLDE is the
first spot. Then, type wshow (IDLDE is still active) and bammo, the IDL
gets moved to the spot of window0, and what was in the second spot (in the
alt-tab window) is the new application.

That is the error in wshow. it is moving the current window to the
idlwindow0 position (and it should do it the other way around, move the
idlwindow0 position to the current window position). maybe :)

cheers,
bob
Re: idl plot window disappearances [message #77316 is a reply to message #77315] Tue, 23 August 2011 15:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
R.G. Stockwell writes:

>> This command does nothing. But, if I do this:
>>
>> xcolors
>> wshow
>>
>> The window 0 pops forward!! This works about
>> 25% of the time and for God only knows what
>> reason. :-)
>
> I have done this a couple of times (in an existing IDL session) but what I
> see is that I can create the window, then put "another app" in front of it,
> then select the IDLDE to type wshow, then wshow will bring that "other app"
> to the front.

Oh, yeah, I forgot to mention that 25% of the time
some other application comes to the front when you
type WShow!! And the other 50% of the time you
don't have the faintest idea what is about to happen!
It's fun! Endless entertainment when you are stuck
in front of a class full of students. You can take
bets if it's really slow. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: idl plot window disappearances [message #77317 is a reply to message #77316] Tue, 23 August 2011 15:42 Go to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
>
>
> "David Fanning" wrote in message
> news:MPG.28bdc21744db25b9989966@news.giganews.com...
>
> Jeremy Bailin writes:
>
>> Would using a cgWindow and cgSet work?
>
> Well, the Coyote Graphics equivalent would be
> cgShow, but alas, the Coyote Graphics rely on
> the underlying IDL programs working correctly.
> So, no, it wouldn't help in this case.
>
> The problem is there is no reliable way to
> bring a direct graphics window forward on the
> display any longer. :-(
>
> In IDL 8.1 for example, I type this:
>
> window
>
> Now, I hide the window behind another application,
> and type this:
>
> wshow
>
> This command does nothing. But, if I do this:
>
> xcolors
> wshow
>
> The window 0 pops forward!! This works about
> 25% of the time and for God only knows what
> reason. :-)

I have done this a couple of times (in an existing IDL session) but what I
see is that I can create the window, then put "another app" in front of it,
then select the IDLDE to type wshow, then wshow will bring that "other app"
to the front.

So here is the hypothesis. IDL uses the wshow command to switch the order
of the windows in the operating system alt-tab q. For instance, I have
IDLDE as the first app (current, on top, active) several other programs,
then the idl window0 at the 7th spot. I type wshow, and IDLDE becomes the
7th spot, everything else moves up 1 (idl window0 is then 6th). The most
recent "other app" was in the second spot, and it moves to the first spot
and appears on top.

So, in terms of the windows7 alt-tab queue, seems to me that the action of
wshow's error is that instead of moving window0 to 'zero', it is moving the
IDLDE
to the spot of the window0. Should be easy enough to fix.

cheers,
bob

PS, it's a bit different with another IDL window (i.e. the xcolors widget),
but I don't have the time to really look at that.
Re: idl plot window disappearances [message #77318 is a reply to message #77317] Tue, 23 August 2011 13:57 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jeremy Bailin writes:

> Would using a cgWindow and cgSet work?

Well, the Coyote Graphics equivalent would be
cgShow, but alas, the Coyote Graphics rely on
the underlying IDL programs working correctly.
So, no, it wouldn't help in this case.

The problem is there is no reliable way to
bring a direct graphics window forward on the
display any longer. :-(

In IDL 8.1 for example, I type this:

window

Now, I hide the window behind another application,
and type this:

wshow

This command does nothing. But, if I do this:

xcolors
wshow

The window 0 pops forward!! This works about
25% of the time and for God only knows what
reason. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: idl plot window disappearances [message #77319 is a reply to message #77318] Tue, 23 August 2011 13:47 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 8/23/11 2:54 PM, desertdryad wrote:
> Hi folks -
>
> I'm a bit ew to IDL programming (but not to programming in general)
> and I have an issue that has me perplexed. I am trying to write a
> simple bit of code, where a plot is drawn and a user is prompted
> whether or not they want to accept a curve fit drawn on said plot, or
> attempt another set of fitting parameters. However, the plot window
> mysteriously vanishes the minute the prompt (from a 'read' command) is
> executed. So, one cannot decide whether to accept the curve fit,
> since it becomes invisible (the plot window simply goes blank). I
> have set 'retain=2' to no avail. How do I fix?
>
> Here is a code snippet:
>
> repeat begin
>
> read, mincurve, prompt='enter MINimum X axis value from the CDF over
> which to curvefit:'
> read, maxcurve, prompt='enter MAXimum X axis value from the CDF curve
> over which to curvefit:'
> print, mincurve, maxcurve
>
> ; now, call the curvefit routine to fit the line from min to max
>
> p = minmaxfit(binnorm, histog[0,*], mincurve, maxcurve)
> print, '0 intercept is at: ', p[0]
>
> ;graph that line!
> x = fltarr(51)
> y = fltarr(51)
> inc=maxcurve/50
> ;print, mincurve, maxcurve, (maxcurve)/40
> for i = 0, 50 do begin
> x[i]=inc*i
> y[i] = (p[1]*x[i]) + p[0]
> ;print, x[i], y[i]
> endfor
>
> cgplot, x, y, color='red', /overplot
> yesorno = ' '
> read, yesorno, prompt='Do you want to use this intercept value (y or
> n)?'
>
> endrep until yesorno EQ 'y'

On an unrelated note, my IDL eyes cringe at that FOR loop. ;-) Here's
an easier version of the paragraph under ";graph that line!"

nx = 51
x = findgen(nx) / (nx-1)
y = p[1]*x + p[0]

-Jeremy.
Re: idl plot window disappearances [message #77320 is a reply to message #77319] Tue, 23 August 2011 13:44 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 8/23/11 3:08 PM, David Fanning wrote:
> desertdryad writes:
>
>> I'm a bit ew to IDL programming (but not to programming in general)
>> and I have an issue that has me perplexed. I am trying to write a
>> simple bit of code, where a plot is drawn and a user is prompted
>> whether or not they want to accept a curve fit drawn on said plot, or
>> attempt another set of fitting parameters. However, the plot window
>> mysteriously vanishes the minute the prompt (from a 'read' command) is
>> executed. So, one cannot decide whether to accept the curve fit,
>> since it becomes invisible (the plot window simply goes blank). I
>> have set 'retain=2' to no avail. How do I fix?
>
> Use two monitors. Display your IDL plot windows on one
> monitor and your IDLDE in the other. ;-)
>
> Until WSet gets fixed (unlikely, since it has been
> broken for so damn long!), there is no hope for this
> on a single monitor system. The alternative, I guess,
> is to write a widget program, rather than trying to
> collect input from the command line.
>
> Cheers,
>
> David
>
>
>

Would using a cgWindow and cgSet work?

-Jeremy.
Re: idl plot window disappearances [message #77321 is a reply to message #77320] Tue, 23 August 2011 13:38 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Until WSet gets fixed (unlikely, since it has been
> broken for so damn long!), there is no hope for this
> on a single monitor system. The alternative, I guess,
> is to write a widget program, rather than trying to
> collect input from the command line.

WSet!? Goodness. I'm getting more senile than I
thought! I mean, of course, WShow. Sheesh!

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: idl plot window disappearances [message #77324 is a reply to message #77321] Tue, 23 August 2011 12:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
desertdryad writes:

> Actually.. I *am* using two monitors; and the plot window and IDLDE
> are on different monitors! So how do I make that work? My coworker
> who is the only other person who needs to uo use my code has two
> monitors, as well... we can improvise :) I was trying to avoid
> learning widgets for now (though I know it will have to happen,
> eventually)

Well, clear everything off your monitor the you are
displaying your graphics on. Create a graphics window, now
run your program. Your graphic window should still be
visible. ;-)

What? That seems onerous? Well, then I use the inexpensive
program Actual Title Buttons, especially when I am teaching
on a laptop, to add the ability to pin a graphics window
to the front, or to roll it up out of the way, when I want
to see something on the display.

It's the only way I know to overcome the problem with WSet
being broken.

Curiously, WSet occasionally works if you run a widget
program just before you type WSet. Don't ask me why.
It's one of the mysteries of the Universe. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: idl plot window disappearances [message #77326 is a reply to message #77324] Tue, 23 August 2011 12:14 Go to previous message
desertdryad is currently offline  desertdryad
Messages: 39
Registered: August 2011
Member
Hi David!

Actually.. I *am* using two monitors; and the plot window and IDLDE
are on different monitors! So how do I make that work? My coworker
who is the only other person who needs to uo use my code has two
monitors, as well... we can improvise :) I was trying to avoid
learning widgets for now (though I know it will have to happen,
eventually)

Cynthia

On Aug 23, 1:08 pm, David Fanning <n...@idlcoyote.com> wrote:
> desertdryad writes:
>> I'm a bit ew to IDL programming (but not to programming in general)
>> and I have an issue that has me perplexed.  I am trying to write a
>> simple bit of code, where a plot is drawn and a user is prompted
>> whether or not they want to accept a curve fit drawn on said plot, or
>> attempt another set of fitting parameters.  However, the plot window
>> mysteriously vanishes the minute the prompt (from a 'read' command) is
>> executed.  So, one cannot decide whether to accept the curve fit,
>> since it becomes invisible (the plot window simply goes blank).  I
>> have set 'retain=2' to no avail.  How do I fix?
>
> Use two monitors. Display your IDL plot windows on one
> monitor and your IDLDE in the other. ;-)
>
> Until WSet gets fixed (unlikely, since it has been
> broken for so damn long!), there is no hope for this
> on a single monitor system. The alternative, I guess,
> is to write a widget program, rather than trying to
> collect input from the command line.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: idl plot window disappearances [message #77327 is a reply to message #77326] Tue, 23 August 2011 12:08 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
desertdryad writes:

> I'm a bit ew to IDL programming (but not to programming in general)
> and I have an issue that has me perplexed. I am trying to write a
> simple bit of code, where a plot is drawn and a user is prompted
> whether or not they want to accept a curve fit drawn on said plot, or
> attempt another set of fitting parameters. However, the plot window
> mysteriously vanishes the minute the prompt (from a 'read' command) is
> executed. So, one cannot decide whether to accept the curve fit,
> since it becomes invisible (the plot window simply goes blank). I
> have set 'retain=2' to no avail. How do I fix?

Use two monitors. Display your IDL plot windows on one
monitor and your IDLDE in the other. ;-)

Until WSet gets fixed (unlikely, since it has been
broken for so damn long!), there is no hope for this
on a single monitor system. The alternative, I guess,
is to write a widget program, rather than trying to
collect input from the command line.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Calculating area of latitude-longitude quadrangle?
Next Topic: polar_cgContour?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:36:19 PDT 2025

Total time taken to generate the page: 0.00785 seconds