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

Home » Public Forums » archive » Re: Frustrated by 2 Data 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: Frustrated by 2 Data Plotting problems [message #76298 is a reply to message #76297] Thu, 26 May 2011 13:57 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
> col=x*0
> nn=n_elements(h2)
> for b=0L, nn-1 do begin &$
> w=histobin(ri1,b) &$
> if w[0] ne -1 then col[w]=h2[b] &$
> endfor

Assuming that you can get the minimum x and y values (say minx and miny) and the bin size (say xbin and ybin) out of sshist_2d, then the following should work and be faster:

h2size = size(h2, /dimen)
col = h2[ floor((x-xmin)/xbin) + floor((y-ymin)/ybin)*h2size[0] ]

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: question
Next Topic: re-binning with linear interpolation

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

Current Time: Wed Oct 08 19:59:40 PDT 2025

Total time taken to generate the page: 0.00490 seconds