Xrange ignored in Errorplot, why? [message #92704] |
Thu, 11 February 2016 03:16  |
galaxytraveler42
Messages: 5 Registered: October 2013
|
Junior Member |
|
|
When I use Errorplot and my errorbars reach outside the x or y-range, then IDl just ignores my range and plots something random.
E.g.
a = [3., 2., 1., 4.,3.]
b = [1., 4., 1., 2.5,2.5]
l = [1., 2., 1., 1.,1.]
k = [2., 2., 1., 2.,1.]
p3 = ERRORPLOT(a,b,l,k, LINESTYLE=6,SYMBOL='o', yrange=[0.,3.],xrange=[0.,5.])
this will give me xrange=[-1,6] and yrange=[0,3]
Going from the theory that the x-range will be expanded one to each side of my interval, I try:
p3 = ERRORPLOT(a,b,l,k, name=dataname1,LINESTYLE=6,SYMBOL='o', yrange=[0.,3.],xrange=[1.,4.])
This will give me the correct x and y range!
However when I try this on my real dataset the theory doesn't hold. There my xrange=[0.,5.] ends up being xrange=[-1.5,5.], and next try of xrange=[1.,4.] ends up being xrange=[-2.5,4.2]
For extra info:
p3 = ERRORPLOT(a,b,l,k, LINESTYLE=6,SYMBOL='o')
Gives me a xrange=[0,5] and yrange=[-2,6]
while this:
p2 = PLOT(a,b, LINESTYLE=6,SYMBOL='o', yrange=[0,3],xrange=[0,5])
This will give me the correct x and y range.
I would appreaciate it, if anyone would like to test out those few lines of code and see if there are getting the same.
If anyone has an idea of the cause please let me know.
PS I have a mac version IDL 8.3.0
|
|
|
|
Re: Xrange ignored in Errorplot, why? [message #94211 is a reply to message #92782] |
Thu, 23 February 2017 08:24   |
burkina
Messages: 32 Registered: February 2005
|
Member |
|
|
On Friday, 26 February 2016 21:50:51 UTC+1, Chris Torrence wrote:
> On Thursday, February 11, 2016 at 4:16:23 AM UTC-7, Galaxytraveler wrote:
>>
>> I would appreaciate it, if anyone would like to test out those few lines of code and see if there are getting the same.
>>
>> If anyone has an idea of the cause please let me know.
>>
>> PS I have a mac version IDL 8.3.0
>
> Hi Galaxytraveler,
>
> This was a bug in the way IDL picked the default plot ranges. It will be fixed in the next version.
>
> Thanks for reporting it!
>
> -Chris
Ciao,
this (annoying) bug is still present in IDL 8.4. Has it been fixed in following releases?
My only workaround is to re-define the range afterwards:
p3.xrange=[0.,5.]
and it apparently works as it should right from the beginning.
Stefano
|
|
|
Re: Xrange ignored in Errorplot, why? [message #94212 is a reply to message #94211] |
Thu, 23 February 2017 11:38  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Thursday, February 23, 2017 at 9:24:40 AM UTC-7, burkina wrote:
> On Friday, 26 February 2016 21:50:51 UTC+1, Chris Torrence wrote:
>> On Thursday, February 11, 2016 at 4:16:23 AM UTC-7, Galaxytraveler wrote:
>>>
>>> I would appreaciate it, if anyone would like to test out those few lines of code and see if there are getting the same.
>>>
>>> If anyone has an idea of the cause please let me know.
>>>
>>> PS I have a mac version IDL 8.3.0
>>
>> Hi Galaxytraveler,
>>
>> This was a bug in the way IDL picked the default plot ranges. It will be fixed in the next version.
>>
>> Thanks for reporting it!
>>
>> -Chris
>
> Ciao,
>
> this (annoying) bug is still present in IDL 8.4. Has it been fixed in following releases?
> My only workaround is to re-define the range afterwards:
>
> p3.xrange=[0.,5.]
>
> and it apparently works as it should right from the beginning.
>
> Stefano
Looks like I fixed this around February of last year, so you would need to upgrade to IDL 8.6 to pick up the change.
-Chris
|
|
|