A bug of NG plot? [message #85531] |
Wed, 14 August 2013 22:48  |
Xin Tao
Messages: 40 Registered: April 2011
|
Member |
|
|
Hello,
The following code can produce some very messy figure from NG plot.
IDL> print, !version
{ x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}
IDL> g=dblarr(10)*0.0+5.0
IDL> ga=g+1e-14*double(randomu(-10,10))
IDL> a=plot(ga)
The size of chars is just not right. I don't know whether it's my problem or it's a bug of IDL. Could someone please let me know how to fix this?
Thanks,
Xin
|
|
|
Re: A bug of NG plot? [message #85532 is a reply to message #85531] |
Thu, 15 August 2013 00:49   |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Thursday, August 15, 2013 7:48:18 AM UTC+2, Xin Tao wrote:
> Hello,
>
>
>
> The following code can produce some very messy figure from NG plot.
>
>
>
> IDL> print, !version
>
> { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}
>
>
>
> IDL> g=dblarr(10)*0.0+5.0
>
> IDL> ga=g+1e-14*double(randomu(-10,10))
>
> IDL> a=plot(ga)
>
>
>
> The size of chars is just not right. I don't know whether it's my problem or it's a bug of IDL. Could someone please let me know how to fix this?
>
>
>
> Thanks,
>
>
>
> Xin
Hi,
same problem here (looks funny, though!).
IDL> print, !version
{ x86_64 Win32 Windows Microsoft Windows 8.2.3 May 3 2013 64 64}
Cheers,
Helder
|
|
|
|
Re: A bug of NG plot? [message #85540 is a reply to message #85535] |
Thu, 15 August 2013 08:28   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
I agree the OP is trying to plot some funky(ish) data, but no way that
should make the axes character size go north in such a big way.
cheers,
paulv
On 08/15/13 08:07, David Fanning wrote:
> Xin Tao writes:
>
>> The following code can produce some very messy figure from NG plot.
>>
>> IDL> print, !version
>> { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64}
>>
>> IDL> g=dblarr(10)*0.0+5.0
>> IDL> ga=g+1e-14*double(randomu(-10,10))
>> IDL> a=plot(ga)
>>
>> The size of chars is just not right. I don't know whether it's my problem or it's a bug of IDL. Could someone please let me know how to fix this?
>
> Honestly, I think it is your problem:
>
> IDL> print, ga, format='(f0.15)'
> 5.000000000000009
> 5.000000000000005
> 5.000000000000005
> 5.000000000000002
> 5.000000000000004
> 5.000000000000005
> 5.000000000000010
> 5.000000000000009
> 5.000000000000003
> 5.000000000000009
>
> Try this:
>
> p = plot(ga-5.0D)
>
> Cheers,
>
> David
>
>
>
|
|
|
|
Re: A bug of NG plot? [message #85551 is a reply to message #85541] |
Thu, 15 August 2013 11:20   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
On 08/15/13 11:54, David Fanning wrote:
> Paul van Delst writes:
>
>> I agree the OP is trying to plot some funky(ish) data, but no way that
>> should make the axes character size go north in such a big way.
>
> I would cut the function graphics programmers some slack here.
For a multi-hundreds->thousand of $$ piece of software?
Uh, no.
> That is
> an EXTREMELY complicated system they are dealing with.
No argument there.
<anecdotal over-generalisation>
As systems get more and more complicated, users tend to get less and
less interested in the implementation details. They just want things to
work.
</anecdotal over-generalisation>
> I can't imagine
> that dealing with a data range that differs in the ninth decimal place
> is the first thing you are trying to keep track of while you are working
> with this code. Nor do I find it too far fetched to think that the
> character size of the plot might have something to do with the axis data
> range. There is a LOT of scaling of axes, viewports, etc. that has to go
> on in an object graphics system. It is not surprising to me to find some
> kind of linkage here.
Doesn't mean it should happen.
Don't get me wrong - I'm not expecting IDL to be as reliable as, say,
avionics software, but it's clearly a bug.
On the plus side, they (Excelis) now have an additional test case for
their QA dept and/or unit tests. Yay for them. :o)
cheers,
paulv
p.s. And, yes, I'm arguing over principle, not degree.
On a scale of 1 (not a problem) to 10 (life is over as we know it), this
bug probably doesn't even make to 0.5.
|
|
|
Re: A bug of NG plot? [message #85553 is a reply to message #85551] |
Thu, 15 August 2013 11:28   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paul van Delst writes:
> p.s. And, yes, I'm arguing over principle, not degree.
>
> On a scale of 1 (not a problem) to 10 (life is over as we know it), this
> bug probably doesn't even make to 0.5.
As always, I agree with everything you say, at least to some
approximation. ;-)
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 bug of NG plot? [message #85567 is a reply to message #85556] |
Fri, 16 August 2013 16:05  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
Hi all,
This fails in both direct and object graphics as well. Direct graphics draws the text okay, but the tick spacing is wacky. Object graphics has the same problem as NG.
plot,[5,5+1d-14],[5,5+1d-14],xstyle=1,ystyle=1
m = idlgrmodel()
m.add, idlgraxis(range=[5,5+1d-14],dir=0,xcoord_conv=[-5/(1d-14),1/ 1d-14])
m.add, idlgraxis(range=[5,5+1d-14],dir=1,ycoord_conv=[-5/(1d-14),1/ 1d-14])
xobjview,m,DOUBLE_VIEW=1
This is now logged as IDL-68840.
Cheers,
Chris
ExelisVIS
|
|
|