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

Home » Public Forums » archive » A possible bug in IDL 8.2.3
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
A possible bug in IDL 8.2.3 [message #84768] Fri, 07 June 2013 19:39 Go to next message
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
I don't know whether this is a bug or not, but the behaviour of the following two lines is not what I expected

IDL> a=plot([0,1,3],yrange=[0,3])
IDL> b = plot([-1,1,2],/overplot, 'g')

The line of b will go outside the plotting box, because it tried to get to -1, but the yrange is limited to be [0,3] by a.

Here is my IDL version:

{ x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}

Please let me know whether there is anything I can do about it.

Thanks,

Xin
Re: A possible bug in IDL 8.2.3 [message #84769 is a reply to message #84768] Fri, 07 June 2013 20:32 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Xin Tao writes:

> I don't know whether this is a bug or not, but the behaviour of the following two lines is not what I expected
>
> IDL> a=plot([0,1,3],yrange=[0,3])
> IDL> b = plot([-1,1,2],/overplot, 'g')

What did you expect?

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: A possible bug in IDL 8.2.3 [message #84770 is a reply to message #84768] Fri, 07 June 2013 21:03 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Friday, June 7, 2013 8:39:57 PM UTC-6, Xin Tao wrote:
> I don't know whether this is a bug or not, but the behaviour of the following two lines is not what I expected
>
>
>
> IDL> a=plot([0,1,3],yrange=[0,3])
>
> IDL> b = plot([-1,1,2],/overplot, 'g')
>
>
>
> The line of b will go outside the plotting box, because it tried to get to -1, but the yrange is limited to be [0,3] by a.
>
>
>
> Here is my IDL version:
>
>
>
> { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}
>
>
>
> Please let me know whether there is anything I can do about it.
>
>
>
> Thanks,
>
>
>
> Xin

Hi Xin,
I would recommend either not setting the YRANGE, or, just setting the Yrange after you add the second plot. Either way should get you what you want.
Cheers,
Chris
ExelisVIS
Re: A possible bug in IDL 8.2.3 [message #84771 is a reply to message #84769] Sat, 08 June 2013 00:07 Go to previous messageGo to next message
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
I expected it to behave in a normal way; i.e., the line of b should not go outside the box, since I have already set the yrange of the plot.

On Saturday, June 8, 2013 11:32:51 AM UTC+8, David Fanning wrote:
> Xin Tao writes:
>
>
>
>> I don't know whether this is a bug or not, but the behaviour of the following two lines is not what I expected
>
>>
>
>> IDL> a=plot([0,1,3],yrange=[0,3])
>
>> IDL> b = plot([-1,1,2],/overplot, 'g')
>
>
>
> What did you expect?
>
>
>
> 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: A possible bug in IDL 8.2.3 [message #84772 is a reply to message #84770] Sat, 08 June 2013 00:15 Go to previous messageGo to next message
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
Hi Chris,

Thanks for your reply. The main purpose here is to set the YRANGE and make all plots obey the YRANGe set by a. I tried your second method, but I need to use the following three lines to get a "normal" plot

IDL> a=plot([0,1,3])
IDL> b = plot([-1,1,2],/overplot)
IDL> c=plot([-1,1,3],/overplot, yrange=[0,3])

If I put yrange keyword in b, it doesn't help at all. Part of the line of b is still outside the box. I have to use the third plot c to set the yrange to a value I want. This of course solved my issue, but it's very strange that I have to use three lines to achieve this.

Xin

On Saturday, June 8, 2013 12:03:26 PM UTC+8, Chris Torrence wrote:
> On Friday, June 7, 2013 8:39:57 PM UTC-6, Xin Tao wrote:
>
>> I don't know whether this is a bug or not, but the behaviour of the following two lines is not what I expected
>
>>
>
>>
>
>>
>
>> IDL> a=plot([0,1,3],yrange=[0,3])
>
>>
>
>> IDL> b = plot([-1,1,2],/overplot, 'g')
>
>>
>
>>
>
>>
>
>> The line of b will go outside the plotting box, because it tried to get to -1, but the yrange is limited to be [0,3] by a.
>
>>
>
>>
>
>>
>
>> Here is my IDL version:
>
>>
>
>>
>
>>
>
>> { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}
>
>>
>
>>
>
>>
>
>> Please let me know whether there is anything I can do about it.
>
>>
>
>>
>
>>
>
>> Thanks,
>
>>
>
>>
>
>>
>
>> Xin
>
>
>
> Hi Xin,
>
> I would recommend either not setting the YRANGE, or, just setting the Yrange after you add the second plot. Either way should get you what you want.
>
> Cheers,
>
> Chris
>
> ExelisVIS
Re: A possible bug in IDL 8.2.3 [message #84773 is a reply to message #84772] Sat, 08 June 2013 00:51 Go to previous messageGo to next message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le samedi 8 juin 2013 09:15:24 UTC+2, Xin Tao a écrit :
> Hi Chris,
>
>
>
> Thanks for your reply. The main purpose here is to set the YRANGE and make all plots obey the YRANGe set by a. I tried your second method, but I need to use the following three lines to get a "normal" plot
>
>
>
> IDL> a=plot([0,1,3])
>
> IDL> b = plot([-1,1,2],/overplot)
>
> IDL> c=plot([-1,1,3],/overplot, yrange=[0,3])
>
>
>
> If I put yrange keyword in b, it doesn't help at all. Part of the line of b is still outside the box. I have to use the third plot c to set the yrange to a value I want. This of course solved my issue, but it's very strange that I have to use three lines to achieve this.
>
>
>
> Xin
>
>
>
> On Saturday, June 8, 2013 12:03:26 PM UTC+8, Chris Torrence wrote:
>
>> On Friday, June 7, 2013 8:39:57 PM UTC-6, Xin Tao wrote:
>
>>
>
>>> I don't know whether this is a bug or not, but the behaviour of the following two lines is not what I expected
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> IDL> a=plot([0,1,3],yrange=[0,3])
>
>>
>
>>>
>
>>
>
>>> IDL> b = plot([-1,1,2],/overplot, 'g')
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> The line of b will go outside the plotting box, because it tried to get to -1, but the yrange is limited to be [0,3] by a.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Here is my IDL version:
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Please let me know whether there is anything I can do about it.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Thanks,
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Xin
>
>>
>
>>
>
>>
>
>> Hi Xin,
>
>>
>
>> I would recommend either not setting the YRANGE, or, just setting the Yrange after you add the second plot. Either way should get you what you want.
>
>>
>
>> Cheers,
>
>>
>
>> Chris
>
>>
>
>> ExelisVIS


My understanding is that OVERPLOT keyword in NG *does not* work like the OPLOT of DG. Indeed, by using OVERPLOT=gr (or 1), you will mix the added plot with the 'gr' (or current) one, but without necessarily retaining the initial plot axes.
To get what you want, you must do a true overlay as follows:

IDL> a = plot([0,1,3],yrange=[0,3])
IDL> b = plot([-1,1,2], POSITION=a.POSITION, YRANGE=a.YRANGE, /CURRENT, 'g')

alx.
Re: A possible bug in IDL 8.2.3 [message #84775 is a reply to message #84773] Sat, 08 June 2013 05:21 Go to previous messageGo to next message
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
Maybe you're right. However in IDL 8.2.2, the two lines in my first post will just give I what I wanted. So the behaviour of overplot actually changed with the release of 8.2.3.

Xin

On Saturday, June 8, 2013 3:51:20 PM UTC+8, alx wrote:
> Le samedi 8 juin 2013 09:15:24 UTC+2, Xin Tao a écrit :
>
>> Hi Chris,
>
>>
>
>>
>
>>
>
>> Thanks for your reply. The main purpose here is to set the YRANGE and make all plots obey the YRANGe set by a. I tried your second method, but I need to use the following three lines to get a "normal" plot
>
>>
>
>>
>
>>
>
>> IDL> a=plot([0,1,3])
>
>>
>
>> IDL> b = plot([-1,1,2],/overplot)
>
>>
>
>> IDL> c=plot([-1,1,3],/overplot, yrange=[0,3])
>
>>
>
>>
>
>>
>
>> If I put yrange keyword in b, it doesn't help at all. Part of the line of b is still outside the box. I have to use the third plot c to set the yrange to a value I want. This of course solved my issue, but it's very strange that I have to use three lines to achieve this.
>
>>
>
>>
>
>>
>
>> Xin
>
>>
>
>>
>
>>
>
>> On Saturday, June 8, 2013 12:03:26 PM UTC+8, Chris Torrence wrote:
>
>>
>
>>> On Friday, June 7, 2013 8:39:57 PM UTC-6, Xin Tao wrote:
>
>>
>
>>>
>
>>
>
>>>> I don't know whether this is a bug or not, but the behaviour of the following two lines is not what I expected
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> IDL> a=plot([0,1,3],yrange=[0,3])
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> IDL> b = plot([-1,1,2],/overplot, 'g')
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> The line of b will go outside the plotting box, because it tried to get to -1, but the yrange is limited to be [0,3] by a.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Here is my IDL version:
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Please let me know whether there is anything I can do about it.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Thanks,
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Xin
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Hi Xin,
>
>>
>
>>>
>
>>
>
>>> I would recommend either not setting the YRANGE, or, just setting the Yrange after you add the second plot. Either way should get you what you want.
>
>>
>
>>>
>
>>
>
>>> Cheers,
>
>>
>
>>>
>
>>
>
>>> Chris
>
>>
>
>>>
>
>>
>
>>> ExelisVIS
>
>
>
>
>
> My understanding is that OVERPLOT keyword in NG *does not* work like the OPLOT of DG. Indeed, by using OVERPLOT=gr (or 1), you will mix the added plot with the 'gr' (or current) one, but without necessarily retaining the initial plot axes.
>
> To get what you want, you must do a true overlay as follows:
>
>
>
> IDL> a = plot([0,1,3],yrange=[0,3])
>
> IDL> b = plot([-1,1,2], POSITION=a.POSITION, YRANGE=a.YRANGE, /CURRENT, 'g')
>
>
>
> alx.
Re: A possible bug in IDL 8.2.3 [message #84776 is a reply to message #84775] Sat, 08 June 2013 05:37 Go to previous messageGo to next message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
On Saturday, June 8, 2013 8:21:51 AM UTC-4, Xin Tao wrote:
> Maybe you're right. However in IDL 8.2.2, the two lines in my first post will just give I what I wanted. So the behaviour of overplot actually changed with the release of 8.2.3.
>
>
>
> Xin
>
>
>
> On Saturday, June 8, 2013 3:51:20 PM UTC+8, alx wrote:
>
>> Le samedi 8 juin 2013 09:15:24 UTC+2, Xin Tao a écrit :
>
>>
>
>>> Hi Chris,
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Thanks for your reply. The main purpose here is to set the YRANGE and make all plots obey the YRANGe set by a. I tried your second method, but I need to use the following three lines to get a "normal" plot
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> IDL> a=plot([0,1,3])
>
>>
>
>>>
>
>>
>
>>> IDL> b = plot([-1,1,2],/overplot)
>
>>
>
>>>
>
>>
>
>>> IDL> c=plot([-1,1,3],/overplot, yrange=[0,3])
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> If I put yrange keyword in b, it doesn't help at all. Part of the line of b is still outside the box. I have to use the third plot c to set the yrange to a value I want. This of course solved my issue, but it's very strange that I have to use three lines to achieve this.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Xin
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> On Saturday, June 8, 2013 12:03:26 PM UTC+8, Chris Torrence wrote:
>
>>
>
>>>
>
>>
>
>>>> On Friday, June 7, 2013 8:39:57 PM UTC-6, Xin Tao wrote:
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > I don't know whether this is a bug or not, but the behaviour of the following two lines is not what I expected
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > IDL> a=plot([0,1,3],yrange=[0,3])
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > IDL> b = plot([-1,1,2],/overplot, 'g')
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > The line of b will go outside the plotting box, because it tried to get to -1, but the yrange is limited to be [0,3] by a.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > Here is my IDL version:
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > Please let me know whether there is anything I can do about it.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > Thanks,
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > Xin
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Hi Xin,
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> I would recommend either not setting the YRANGE, or, just setting the Yrange after you add the second plot. Either way should get you what you want.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Cheers,
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Chris
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> ExelisVIS
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> My understanding is that OVERPLOT keyword in NG *does not* work like the OPLOT of DG. Indeed, by using OVERPLOT=gr (or 1), you will mix the added plot with the 'gr' (or current) one, but without necessarily retaining the initial plot axes.
>
>>
>
>> To get what you want, you must do a true overlay as follows:
>
>>
>
>>
>
>>
>
>> IDL> a = plot([0,1,3],yrange=[0,3])
>
>>
>
>> IDL> b = plot([-1,1,2], POSITION=a.POSITION, YRANGE=a.YRANGE, /CURRENT, 'g')
>
>>
>
>>
>
>>
>
>> alx.

I agree with Xin that the new behavior is less desirable that the old. If I set the range in the original plot, then I probably want to keep that range as I build up the graphic. I wonder if this new behavior is related to the issue of plotting speed for complicated graphics that arose over 8.2.2.

David
Re: A possible bug in IDL 8.2.3 [message #84778 is a reply to message #84776] Sat, 08 June 2013 06:41 Go to previous messageGo to next message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le samedi 8 juin 2013 14:37:28 UTC+2, David Grier a écrit :
> On Saturday, June 8, 2013 8:21:51 AM UTC-4, Xin Tao wrote:
>
>> Maybe you're right. However in IDL 8.2.2, the two lines in my first post will just give I what I wanted. So the behaviour of overplot actually changed with the release of 8.2.3.
>
>>
>
>>
>
>>
>
>> Xin
>
>>
>
>>
>
>>
>
>> On Saturday, June 8, 2013 3:51:20 PM UTC+8, alx wrote:
>
>>
>
>>> Le samedi 8 juin 2013 09:15:24 UTC+2, Xin Tao a écrit :
>
>>
>
>>>
>
>>
>
>>>> Hi Chris,
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Thanks for your reply. The main purpose here is to set the YRANGE and make all plots obey the YRANGe set by a. I tried your second method, but I need to use the following three lines to get a "normal" plot
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> IDL> a=plot([0,1,3])
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> IDL> b = plot([-1,1,2],/overplot)
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> IDL> c=plot([-1,1,3],/overplot, yrange=[0,3])
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> If I put yrange keyword in b, it doesn't help at all. Part of the line of b is still outside the box. I have to use the third plot c to set the yrange to a value I want. This of course solved my issue, but it's very strange that I have to use three lines to achieve this.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Xin
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> On Saturday, June 8, 2013 12:03:26 PM UTC+8, Chris Torrence wrote:
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > On Friday, June 7, 2013 8:39:57 PM UTC-6, Xin Tao wrote:
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > > I don't know whether this is a bug or not, but the behaviour of the following two lines is not what I expected
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > > IDL> a=plot([0,1,3],yrange=[0,3])
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > > IDL> b = plot([-1,1,2],/overplot, 'g')
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > > The line of b will go outside the plotting box, because it tried to get to -1, but the yrange is limited to be [0,3] by a.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > > Here is my IDL version:
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > > { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > > Please let me know whether there is anything I can do about it.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > > Thanks,
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > > Xin
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > Hi Xin,
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > I would recommend either not setting the YRANGE, or, just setting the Yrange after you add the second plot. Either way should get you what you want.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > Cheers,
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > Chris
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> >
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> > ExelisVIS
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> My understanding is that OVERPLOT keyword in NG *does not* work like the OPLOT of DG. Indeed, by using OVERPLOT=gr (or 1), you will mix the added plot with the 'gr' (or current) one, but without necessarily retaining the initial plot axes.
>
>>
>
>>>
>
>>
>
>>> To get what you want, you must do a true overlay as follows:
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> IDL> a = plot([0,1,3],yrange=[0,3])
>
>>
>
>>>
>
>>
>
>>> IDL> b = plot([-1,1,2], POSITION=a.POSITION, YRANGE=a.YRANGE, /CURRENT, 'g')
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> alx.
>
>
>
> I agree with Xin that the new behavior is less desirable that the old. If I set the range in the original plot, then I probably want to keep that range as I build up the graphic. I wonder if this new behavior is related to the issue of plotting speed for complicated graphics that arose over 8.2.2.
>
>
>
> David


Indeed the behaviour of keyword OVERPLOT looks like to have changed in 8.2.3.
In 8.2.2 and before, when using /OVERPLOT, the axis ranges were modified as needed in order to show all of the two curves in a single window. In 8.2.2, the second plot seems to be just shown unclipped within the initial window. The new behaviour appears to me a bit more consistent, but still not ideal.
I shall continue to prefer the combination of POSITION and RANGE keywords in order to safely overplot several curves.
alx.
Re: A possible bug in IDL 8.2.3 [message #84849 is a reply to message #84768] Thu, 13 June 2013 13:24 Go to previous messageGo to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
This bugs is so bad, it virtually breaks all my codes. So I am doing what I have never done in almost 30 years of using IDL, which is to roll back to an older version. So v8.2.2 it is until the next release.

On Friday, June 7, 2013 10:39:57 PM UTC-4, Xin Tao wrote:
> I don't know whether this is a bug or not, but the behaviour of the following two lines is not what I expected
>
>
>
> IDL> a=plot([0,1,3],yrange=[0,3])
>
> IDL> b = plot([-1,1,2],/overplot, 'g')
>
>
>
> The line of b will go outside the plotting box, because it tried to get to -1, but the yrange is limited to be [0,3] by a.
>
>
>
> Here is my IDL version:
>
>
>
> { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}
>
>
>
> Please let me know whether there is anything I can do about it.
>
>
>
> Thanks,
>
>
>
> Xin
Re: A possible bug in IDL 8.2.3 [message #84850 is a reply to message #84849] Thu, 13 June 2013 13:31 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Haje Korth writes:

> This bugs is so bad, it virtually breaks all my codes. So I am doing what I have never done in almost 30 years of using IDL, which is to roll back to an older version. So v8.2.2 it is until the next release.

Let's see, I think I predicted that the function graphics system is so
complicated that fixing one thing would inevitably have to break
something else. Let's hope whatever it is in next release doesn't affect
your work. ;-)

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: A possible bug in IDL 8.2.3 [message #84851 is a reply to message #84850] Thu, 13 June 2013 13:53 Go to previous messageGo to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Congratulations on your prediction, wish you were wrong!

On Thursday, June 13, 2013 4:31:39 PM UTC-4, David Fanning wrote:
> Haje Korth writes:
>
>
>
>> This bugs is so bad, it virtually breaks all my codes. So I am doing what I have never done in almost 30 years of using IDL, which is to roll back to an older version. So v8.2.2 it is until the next release.
>
>
>
> Let's see, I think I predicted that the function graphics system is so
>
> complicated that fixing one thing would inevitably have to break
>
> something else. Let's hope whatever it is in next release doesn't affect
>
> your work. ;-)
>
>
>
> 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: A possible bug in IDL 8.2.3 [message #84852 is a reply to message #84851] Thu, 13 June 2013 13:55 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Haje Korth writes:

> Congratulations on your prediction, wish you were wrong!

Yes, no joy in being right, that's for sure.

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: A possible bug in IDL 8.2.3 [message #84859 is a reply to message #84852] Fri, 14 June 2013 10:43 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
Hi all,

This is indeed a bug in IDL 8.2.3. When I tried out Xin's initial code, I didn't see the problem because it had already been fixed, so I assumed it was just a misunderstanding of how overplot worked. My bad!

Anyway, it looks like it is just a couple of files that need to get changed. Mark Piper is going to post them to our website for download.

In the meantime, if you need a quick fix for the problem, one workaround is to disable and then re-enable clipping for the plot. Like this:
a=plot([0,1,3],yrange=[0,3])
b = plot([-1,1,2],/overplot, 'g',clip=0)
b.clip = 1

Sorry for the bug, and thanks for reporting it!

Cheers,
Chris
ExelisVIS
Re: A possible bug in IDL 8.2.3 [message #84866 is a reply to message #84859] Fri, 14 June 2013 13:21 Go to previous messageGo to next message
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
On Friday, June 14, 2013 11:43:35 AM UTC-6, Chris Torrence wrote:
>
> Anyway, it looks like it is just a couple of files that need to get changed.
>

Here's Chris' fix. It requires two PRO files. Drop this file:

ftp://download.exelisvis.com/groups/esg/dropoff/idlitvisdata space__define.pro

into the lib/itools/framework directory, and this file:

ftp://download.exelisvis.com/groups/esg/dropoff/idlitvisplot __define.pro

into lib/itools/component. Reset your IDL session to ensure these autocompile when called.

I've checked this with Xin's code on Linux and Windows.

mp
Re: A possible bug in IDL 8.2.3 [message #84875 is a reply to message #84866] Sat, 15 June 2013 03:24 Go to previous messageGo to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Thanks Chris and Mark. This one was a show stopper and the quick fix is much appreciated. Haje

On Friday, June 14, 2013 4:21:12 PM UTC-4, Mark Piper wrote:
> On Friday, June 14, 2013 11:43:35 AM UTC-6, Chris Torrence wrote:
>
>>
>
>> Anyway, it looks like it is just a couple of files that need to get changed.
>
>>
>
>
>
> Here's Chris' fix. It requires two PRO files. Drop this file:
>
>
>
> ftp://download.exelisvis.com/groups/esg/dropoff/idlitvisdata space__define.pro
>
>
>
> into the lib/itools/framework directory, and this file:
>
>
>
> ftp://download.exelisvis.com/groups/esg/dropoff/idlitvisplot __define.pro
>
>
>
> into lib/itools/component. Reset your IDL session to ensure these autocompile when called.
>
>
>
> I've checked this with Xin's code on Linux and Windows.
>
>
>
> mp
Re: A possible bug in IDL 8.2.3 [message #84878 is a reply to message #84866] Sun, 16 June 2013 07:27 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mark Piper writes:

> Here's Chris' fix. It requires two PRO files. Drop this file:
>
> ftp://download.exelisvis.com/groups/esg/dropoff/idlitvisdata space__define.pro
>
> into the lib/itools/framework directory, and this file:
>
> ftp://download.exelisvis.com/groups/esg/dropoff/idlitvisplot __define.pro
>
> into lib/itools/component. Reset your IDL session to ensure these autocompile when called.
>
> I've checked this with Xin's code on Linux and Windows.

I just tried this on my Windows machine and it doesn't work. The reason,
I *think* it doesn't work is that I don't have permission to write into
those directories on my machine. (Although I don't get any errors when I
try to save the files to those directories.) I have the same problem
when I make any change in a lib file. I have to move the file to a
directory I own to make the change.

I presume this has to do with permissions on these directories, and I
presume I have permission to change those permissions. But, I have no
idea how to go about this. Any ideas?

Cheers,

David

P.S. I just confirmed that even though it appeared I was able to write
into those two directories, nothing in the two directories (as
determined by the data modified property) was changed.



--
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: A possible bug in IDL 8.2.3 [message #84879 is a reply to message #84878] Sun, 16 June 2013 07:42 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

>
> Mark Piper writes:
>
>> Here's Chris' fix. It requires two PRO files. Drop this file:
>>
>> ftp://download.exelisvis.com/groups/esg/dropoff/idlitvisdata space__define.pro
>>
>> into the lib/itools/framework directory, and this file:
>>
>> ftp://download.exelisvis.com/groups/esg/dropoff/idlitvisplot __define.pro
>>
>> into lib/itools/component. Reset your IDL session to ensure these autocompile when called.
>>
>> I've checked this with Xin's code on Linux and Windows.
>
> I just tried this on my Windows machine and it doesn't work. The reason,
> I *think* it doesn't work is that I don't have permission to write into
> those directories on my machine. (Although I don't get any errors when I
> try to save the files to those directories.) I have the same problem
> when I make any change in a lib file. I have to move the file to a
> directory I own to make the change.
>
> I presume this has to do with permissions on these directories, and I
> presume I have permission to change those permissions. But, I have no
> idea how to go about this. Any ideas?
>
> Cheers,
>
> David
>
> P.S. I just confirmed that even though it appeared I was able to write
> into those two directories, nothing in the two directories (as
> determined by the data modified property) was changed.

To make this work on my Windows computer, I had to right-click on the
/lib/itools folder and choose the Properties selection from the menu.
Then, I had to chose the Security tab on the Properties dialog. I
selected the Group CREATOR OWNER and hit the Edit tab below the Group
selector and click the Allow box on the Full Control selection pop-up.

Then, I dragged the files from another location where I had saved them
into the appropriate directories. I got a dialog indicating I needed
Administrator privilege to move a file into the directory. I clicked OK,
and they were moved into the directories successfully.

I don't know if any or all of this is necessary. I just know I can't
save them into IDL-owned directories directly.

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: A possible bug in IDL 8.2.3 [message #84883 is a reply to message #84866] Mon, 17 June 2013 06:36 Go to previous messageGo to next message
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
This fix works great. Thanks.

Xin

On Saturday, June 15, 2013 4:21:12 AM UTC+8, Mark Piper wrote:
> On Friday, June 14, 2013 11:43:35 AM UTC-6, Chris Torrence wrote:
>
>>
>
>> Anyway, it looks like it is just a couple of files that need to get changed.
>
>>
>
>
>
> Here's Chris' fix. It requires two PRO files. Drop this file:
>
>
>
> ftp://download.exelisvis.com/groups/esg/dropoff/idlitvisdata space__define.pro
>
>
>
> into the lib/itools/framework directory, and this file:
>
>
>
> ftp://download.exelisvis.com/groups/esg/dropoff/idlitvisplot __define.pro
>
>
>
> into lib/itools/component. Reset your IDL session to ensure these autocompile when called.
>
>
>
> I've checked this with Xin's code on Linux and Windows.
>
>
>
> mp
Re: A possible bug in IDL 8.2.3 [message #84916 is a reply to message #84866] Tue, 18 June 2013 11:13 Go to previous message
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
We've found a related clipping problem that affects CONTOUR and SURFACE. Drop this file:

ftp://download.exelisvis.com/groups/esg/dropoff/idlitsrvcrea tevisualization__define.pro

into the lib/itools/framework directory to fix it.

mp
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Contour over map problems in IDL8.2 new graphics
Next Topic: structure length in files

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

Current Time: Wed Oct 08 15:37:08 PDT 2025

Total time taken to generate the page: 0.00836 seconds