Re: A possible bug in IDL 8.2.3 [message #84772 is a reply to message #84770] |
Sat, 08 June 2013 00:15   |
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
|
|
|