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

Home » Public Forums » archive » Weighted histogram
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Weighted histogram [message #55672] Mon, 27 August 2007 19:20
snudge42 is currently offline  snudge42
Messages: 4
Registered: July 2007
Junior Member
Hi guys,

I have an array of velocities, final_v, and an array of weightings,
prob_arr, which may look something like:

final_v = [0,10,20,30,40,50,60,70,80,90]
prob_arr = [0.05,0.1,0.05,0.0,0.05,0.15,0.2,0.2,0.15,0.05]

I'd like to plot a histogram with the velocities along the x-axis and
the weighted histogram values along the y-axis. I've got the first bit
happening, but am having trouble working out how to do the y-axis.
This is my code so far:

testHisto = HISTOGRAM(final_v)
s = SIZE(testHisto)
maxData = MAX(final_v, MIN=minData)
x = FINDGEN(s(1)) * ((maxData - minData)/(s(1)-1)) + minData
plot, x, testHisto, PSYM = 10, XSTYLE=1


Any help out there?

Sebastian
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Bug in IDL's TIMEGEN function
Next Topic: Re: Is there somebody familiar with nurbs or b-Spline?

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

Current Time: Wed Oct 08 17:19:33 PDT 2025

Total time taken to generate the page: 0.00514 seconds