DataBins2D

class visualife.calc.DataBins2D(**kwargs)

Bases: visualife.calc.Histogram2D

DataBins2D class is a kind of a 2D histograms that records all the data that has been inserted into it.

The object records the full row of data rather than just the two values used to define the 2D bin of this histogram

Creates the object :param kwargs: passed to the base class constructor

Methods Summary

count()
get_bin_by_coordinates(coords)
get_bin_by_point(point)
get_bin_coordinates(point)
get_histogram()
get_observations(bin_coords)
get_xyv()
histogram_x()
histogram_y()
observe(*points, **kwargs) Adds observation(s) to this DataBins object
observe_x_y(x, y, *row) Adds an observation to this DataBins object
outliers()

Methods Documentation

count()
get_bin_by_coordinates(coords)
get_bin_by_point(point)
get_bin_coordinates(point)
get_histogram()
get_observations(bin_coords)
get_xyv()
histogram_x()
histogram_y()
observe(*points, **kwargs)

Adds observation(s) to this DataBins object

This method observes a whole row of data in a 2D bin identified by its two columns. It decides what should be observed and then calls observe_x_y() of the base class to make the actual observation. Finally it records the data object in the appropriate bin

Parameters:
  • pointstuple(float,float) or list(tuple(float,float)) - data to be inserted into this histogram
  • kwargs – see below
Returns:

None

Keyword Arguments:
 
  • columns (tuple(int,int)) – which columns of data holds the observations for the histogram
  • i_column (int) – which column of data hold observations for the first dimension
  • j_column (int) – which column of data hold observations for the second dimension
observe_x_y(x, y, *row)

Adds an observation to this DataBins object

This method observes a whole row of data in a 2D bin identified by its two values.

Parameters:
  • x – value in the first dimension
  • y – value in the second dimension
  • row – the row of data to be recorded
Returns:

2D index of the bin where teh given data point was inserted (int, int)

outliers()