Package Biskit :: Module hist
[hide private]
[frames] | no frames]

Module hist

source code

create a histogram from data

Classes [hide private]
  Test
Test case

Functions [hide private]
array histogram(data, nbins, range=None)
Create a histogram.
array density(x, nBins, range=None, steps=1, hist=0)
returns the normalized histogram of x:

Function Details [hide private]

histogram(data, nbins, range=None)

source code 

Create a histogram. Comes from Konrad Hinsen: Scientific Python
Parameters:
  • data ([any]) - data list or array
  • nbins (int) - number of bins
  • range ((float, float) OR None) - data range to create histogram from (min val, max val)
Returns: array
array (2 x len(data) ) with start of bin and witdh of bin.

density(x, nBins, range=None, steps=1, hist=0)

source code 

returns the normalized histogram of x:
 density( data, nBins [,range=None, steps=1, hist=0|1] ) -> array
Parameters:
  • x ([any]) - data list or array
  • nBins (int) - number of bins
  • range ((float, float) OR None) - data range to create histogram from (min val, max val)
  • steps (1|0) - 1: histogram appears as a discrete graph (default 1)
  • hist (1|0) - 0: normalize histogram (default 0)
Returns: array
array (2 x len(data) ) with start of bin and witdh of bin.