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

Home » Public Forums » archive » Re: Problem in oploterror in cgWindow
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: Problem in oploterror in cgWindow [message #83244] Wed, 13 February 2013 20:15
Poonam is currently offline  Poonam
Messages: 7
Registered: June 2011
Junior Member
Thanks David,

You are always there for my rescue. Yes, this will work in the meantime.

Ciao
Poonam

On Thursday, February 14, 2013 7:02:07 AM UTC+5:30, David Fanning wrote:
> David Fanning writes:
>
>
>
>>
>
>> poonam.chandra@gmail.com writes:
>
>>
>
>>> Please somebody help me with this. I really need to get it done very soon. I have a deadline to meet.
>
>>
>
>> Hi Poonam,
>
>>
>
>> Your earlier messages didn't show up on my newsreader for some reason.
>
>> Sorry for not responding sooner.
>
>>
>
>> I have a meeting tonight that starts in just a few minutes and will last
>
>> a few hours. But, just glancing at this problem, it appears oploterror
>
>> is turning cgWindow off! At least in my version, after I call it, my
>
>> window no longer resizes or anything!
>
>>
>
>> I really don't know why it would be doing that. I'll investigate and get
>
>> back to you as soon as I can.
>
>
>
> OK, I find these lines at about line 235 in oploterror:
>
>
>
> ; if window then begin
>
> ; cgcontrol, execute = 0
>
> ; wset,cgquery(/current)
>
> ; endif
>
>
>
> I don't know why they are there. (This is a NASA Astronomy routine.)
>
> But, if I comment them out, then things appear to work normally.
>
>
>
> IDL> cgplot, x, y, /Window, WMulti=[0,2,1]
>
> IDL> oploterror, x, y, replicate(4, 101), /addcmd
>
> IDL> cgplot, x, y, /addcmd
>
> IDL> oploterror, x, y, replicate(4, 101), /addcmd
>
>
>
> Will that work until I can talk to Wayne about what is going on here?
>
>
>
> Cheers,
>
>

>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Problem in oploterror in cgWindow [message #83245 is a reply to message #83244] Wed, 13 February 2013 17:32 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

>
> poonam.chandra@gmail.com writes:
>
>> Please somebody help me with this. I really need to get it done very soon. I have a deadline to meet.
>
> Hi Poonam,
>
> Your earlier messages didn't show up on my newsreader for some reason.
> Sorry for not responding sooner.
>
> I have a meeting tonight that starts in just a few minutes and will last
> a few hours. But, just glancing at this problem, it appears oploterror
> is turning cgWindow off! At least in my version, after I call it, my
> window no longer resizes or anything!
>
> I really don't know why it would be doing that. I'll investigate and get
> back to you as soon as I can.

OK, I find these lines at about line 235 in oploterror:

; if window then begin
; cgcontrol, execute = 0
; wset,cgquery(/current)
; endif

I don't know why they are there. (This is a NASA Astronomy routine.)
But, if I comment them out, then things appear to work normally.

IDL> cgplot, x, y, /Window, WMulti=[0,2,1]
IDL> oploterror, x, y, replicate(4, 101), /addcmd
IDL> cgplot, x, y, /addcmd
IDL> oploterror, x, y, replicate(4, 101), /addcmd

Will that work until I can talk to Wayne about what is going on here?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Problem in oploterror in cgWindow [message #83246 is a reply to message #83245] Wed, 13 February 2013 17:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
poonam.chandra@gmail.com writes:

> Please somebody help me with this. I really need to get it done very soon. I have a deadline to meet.

Hi Poonam,

Your earlier messages didn't show up on my newsreader for some reason.
Sorry for not responding sooner.

I have a meeting tonight that starts in just a few minutes and will last
a few hours. But, just glancing at this problem, it appears oploterror
is turning cgWindow off! At least in my version, after I call it, my
window no longer resizes or anything!

I really don't know why it would be doing that. I'll investigate and get
back to you as soon as I can. I wonder if you can use cgErrPlot in the
meantime?

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Problem in oploterror in cgWindow [message #83247 is a reply to message #83246] Wed, 13 February 2013 17:01 Go to previous message
Poonam is currently offline  Poonam
Messages: 7
Registered: June 2011
Junior Member
Please somebody help me with this. I really need to get it done very soon. I have a deadline to meet.

Thanks
Poonam
Re: Problem in oploterror in cgWindow [message #83259 is a reply to message #83247] Wed, 13 February 2013 02:18 Go to previous message
Poonam is currently offline  Poonam
Messages: 7
Registered: June 2011
Junior Member
To make my problem more clear, I explain it in more detail:

readcol, 'alpha-L-C.dat', t1, tr1, a1, e1

cgWindow, 'cgplot',t1,a1,xstyle=1,ystyle=1,xthick=2, ythick=2,/xlog,$
psym=16,symsize=3, color='gray', xrange=[2,600], yrange=[-1.8,1.4],$
xtitle='Days since explosion', ytitle='Spectral Index (L band/C Band)',$
WMULTI=[0,2,1]

readcol, 'alpha-C-X.dat', t1, tr1, a1, e1

cgWindow, 'cgplot',t1,a1,xstyle=1,ystyle=1,xthick=2, ythick=2,/xlog,$
psym=16,symsize=3, color='gray', xrange=[2,600], yrange=[-1.8,1.4],$
xtitle='Days since explosion', ytitle='Spectral Index (C band/X Band)',/addcmd

works fine.

But
readcol, 'alpha-L-C.dat', t1, tr1, a1, e1

cgWindow, 'cgplot',t1,a1,xstyle=1,ystyle=1,xthick=2, ythick=2,/xlog,$
psym=16,symsize=3, color='gray', xrange=[2,600], yrange=[-1.8,1.4],$
xtitle='Days since explosion', ytitle='Spectral Index (L band/C Band)',$
WMULTI=[0,2,1]

oploterror,t1,a1,tr1, e1, psym=9, symsize=3, thick=5,color='black',$
/noerase, /addcmd

readcol, 'alpha-C-X.dat', t1, tr1, a1, e1

cgWindow, 'cgplot',t1,a1,xstyle=1,ystyle=1,xthick=2, ythick=2,/xlog,$
psym=16,symsize=3, color='gray', xrange=[2,600], yrange=[-1.8,1.4],$
xtitle='Days since explosion', ytitle='Spectral Index (C band/X Band)',/addcmd

oploterror,t1,a1,tr1, e1, psym=9, symsize=3, thick=5,color='black',$
/noerase, /addcmd

does not create the second plot but cgWindow, /ListCmd shows

IDL> cgWindow, /ListCmd
0. cgplot, p1, p2, COLOR=value, PSYM=value, SYMSIZE=value, XLOG=value, XRANGE=value, XSTYLE=value, XTHICK=value, XTITLE=value, YRANGE=value, YSTYLE=value, YTHICK=value, YTITLE=value
1. oploterror, p1, p2, p3, p4, THICK=value, COLOR=value, NOERASE=value, PSYM=value, SYMSIZE=value
2. cgplot, p1, p2, COLOR=value, PSYM=value, SYMSIZE=value, XLOG=value, XRANGE=value, XSTYLE=value, XTHICK=value, XTITLE=value, YRANGE=value, YSTYLE=value, YTHICK=value, YTITLE=value
3. oploterror, p1, p2, p3, p4, THICK=value, COLOR=value, NOERASE=value, PSYM=value, SYMSIZE=value
IDL>

which means second plot should have been plotted. Also when I save the plot to ps file and try to see in gv, it says:

gv cgwindow.ps
gv: Cannot open file cgwindow.ps (No data available)








On Wednesday, February 13, 2013 3:32:28 PM UTC+5:30, poonam....@gmail.com wrote:
> Hi,
>
> I am using Coyote's cgWindow to plot my data.
>
>
>
> If I make a multiplot using
>
>
>
> cgWindow, 'cgplot',x,y,WMULTI=[0,2,1]
>
> cgWindow, 'cgplot',x1,y,/addcmd
>
>
>
> it works fine and I can also save it as a ps file from the cgwindow itself.
>
> But I need to add errors in both plot and I am using something like this:
>
>
>
> cgWindow, 'cgplot',x,y,WMULTI=[0,2,1]
>
> oploterror, x, y, delx, dely, /noerase, /addcmd
>
>
>
> cgWindow, 'cgplot',x1,y1,/addcmd
>
> oploterror, x1, y1, delx1, dely1, /noerase,/addcmd
>
>
>
> In this case after first oploterror command, the second figure does not appear.
>
> And program does not complain too. Also if I use oploterror in cgwindow, I am not able to save the as a ps file. It creates an empty plot file. If I remove oploterror command from my file, everything works fine. What is going on?
>
>
>
> Please help me. I have used it successfully in the past but am not able to use it now.
>
>
>
> Thanks
>
> Poonam
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IF THEN ELSE Completion
Next Topic: Confusing and suspicious PROFILER output

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

Current Time: Wed Oct 08 13:40:25 PDT 2025

Total time taken to generate the page: 0.00641 seconds