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

Home » Public Forums » archive » Re: Longword plotting problems...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Longword plotting problems... [message #11981 is a reply to message #11980] Mon, 22 June 1998 00:00 Go to previous message
menakkis is currently offline  menakkis
Messages: 37
Registered: June 1998
Member
"Geraint H. Jones" <g.h.jones@ic.ac.uk> wrote:
> I'm handling data files (well, trying to!) in which the time is recorded
> as the number of seconds since the beginning of 1950 (I know it's not
> the easiest format to deal with, but it's what I have to work with). In
> order to get precision to the level of seconds, I have to use longword
> arrays.
>
> This is all fine, but the problem is plotting using the longword arrays.
> Whatever plot ranges I choose, the time values in the plots are
> quantized, i.e. they do not increase smoothly, even though the values
> in the array itself increase smoothly. I've attached a short piece of
> example code below to demonstrate this...
>
> ; Example code
>
> time=lindgen(10)+13254100
>
> data=findgen(10)
>
> plot,time,data

I think that there's no way to do this the way you'd like. What's happening
is that your times are using well over 24 bits in the longwords, and the
FLOAT format can only represent integers accurately if they use about 24 bits
- any more is simply lost (from the "small end"). Unfortunately, the PLOT
routine (& friends) converts its arguments to FLOAT. A "double misfortune"
(sorry :-) - even if you pass DOUBLE arguments to PLOT, it will convert them
to FLOAT!

Perhaps you could plot offset-removed seconds across X; i.e., first subtract
the smallest time value.

(BTW, I had to use time=lindgen(10)+'0fffffff'x to get your example to really
kick.)


Peter Mason

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
[Message index]
 
Read Message
Read Message
Previous Topic: Re: IDL Object for creating a Singleton
Next Topic: Color Postscript from Object Graphics.

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

Current Time: Sat Oct 11 00:52:49 PDT 2025

Total time taken to generate the page: 0.32503 seconds