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

Home » Public Forums » archive » Re: How to display single orbits of satellite data in function graphics?
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: How to display single orbits of satellite data in function graphics? [message #84102 is a reply to message #84101] Tue, 30 April 2013 11:50 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
Hi Paul,

A little late to the party, but I can add a couple of points.

1:

If you have the points all at once, then as David says, this would work fine
(and for your 131,085 points my aging MacBook Pro with IDL 8.2.2 did this Plot()
in 3.77 seconds)

;; Placing all points in one plot (no joining lines)

p = PLOT(lon, lat,$
SYMBOL='circle', $ ; SYM_COLOR=colour,$ ; not needed
/SYM_FILLED, $ ; SYM_FILL_COLOR=colour,$ ; not needed
RGB_TABLE=3, $
VERT_COLORS=colour, $
LINESTYLE=6, $
/OVERPLOT)

But if you really need to add the points one at a time (because they're not
available at the start), p.SetData is your friend, allowing you to assign a new,
longer set of lon/lat values as you get new data. I'm simulating this situation
here, and assuming that the colours aren't known beforehand either:

;; Placing first two points in a plot (no joining lines)...

p = PLOT(lon[0:1], lat[0:1],$
RGB_TABLE=3, $
SYMBOL='circle', $ ;SYM_COLOR=colour[0:1],$
/SYM_FILLED, $ ;SYM_FILL_COLOR=colour[0:1],$
VERT_COLORS=colour[0:1], $
LINESTYLE=6, $
/OVERPLOT)

FOR i = 1L, N_ELEMENTS(variable)-1L DO BEGIN ; Each time we get new data
map.Refresh, /Disable
p.SetData, lon[0:i], lat[0:i]
p.Vert_Colors = colour[0:i]
map.Refresh
END

2:

I found an oddity in the behaviour with and without refreshing: how is it that
when only performing *two* operations, having it refresh automatically takes
*three* times as long as doing one refresh at the end? This is with the 131,085
points (note that I'm using the handy 8.2.2 routines TIC and TOC that just start
and stop a timer... somebody may have liked my old TStart and TReport routines!):

IDL> map.Refresh & tic & p.setdata, lon, lat & p.Vert_Colors = colour & toc
% Time elapsed: 10.551133 seconds.

IDL> map.Refresh, /Disable & tic & p.setdata, lon, lat & p.Vert_Colors = colour
& map.Refresh & toc
% Time elapsed: 3.6593549 seconds.

Chris? Mark? Could there be an extra redraw happening when refresh is on?

Cheers,
-Dick

Dick Jackson Software Consulting
Victoria, BC, Canada --- +1-250-220-6117
dick@d-jackson.com --- http://www.d-jackson.com


David Fanning wrote:
> Paul van Delst writes:
>
>> And here is my practically line-by-line translation of the above using
>> FG. note that I am using "PLOT()" to approximate PLOTS by simply
>> overplotting the same point.
>
> My first thought would have been to try to plot all points at once, with
> a single Plot() command, without the loop. Did you try that?
>
> Cheers,
>
> David
>
>
>


--

Cheers,
-Dick

Dick Jackson Software Consulting
Victoria, BC, Canada
www.d-jackson.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: i cann't open idl because idlde.exe has stopped working.
Next Topic: How to convert saved postscript file to PNG

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

Current Time: Fri Oct 10 09:35:46 PDT 2025

Total time taken to generate the page: 1.36703 seconds