Phoenix Logo

phoenix_title wx.lib.plot.polyobjects.PolyHistogram

Creates a PolyHistogram object.

param hist:The histogram data.
type hist:sequence of y values that define the heights of the bars
param binspec:The bin specification.
type binspec:sequence of x values that define the edges of the bins
param **attr:keyword attributes
Keyword and Default Description Type
edgecolour='black' edge color wx.Colour
edgewidth=3 edge width float
edgestyle=wx.PENSTYLE_SOLID edge style wx.PenStyle
fillcolour='blue' fill color wx.Colour
fillstyle=wx.BRUSHSTYLE_SOLID fill style wx.BrushStyle
legend='' legend string str

Tip

Use np.histogram() to easily create your histogram parameters:

hist_data, binspec = np.histogram(data)
hist_plot = PolyHistogram(hist_data, binspec)

Important

len(binspec) must equal len(hist) + 1.

Warning

All methods except __init__ are private.


class_hierarchy Class Hierarchy

Inheritance diagram for class PolyHistogram:


method_summary Methods Summary

__init__  
calc_rect Calculate the rectangle for plotting.
draw Draw the bars

api Class API



class PolyHistogram(PolyBarsBase)

Creates a PolyHistogram object.

Parameters:
  • hist (sequence of y values that define the heights of the bars) – The histogram data.
  • binspec (sequence of x values that define the edges of the bins) – The bin specification.
  • **attr – keyword attributes

Keyword and Default Description Type
edgecolour='black' edge color wx.Colour
edgewidth=3 edge width float
edgestyle=wx.PENSTYLE_SOLID edge style wx.PenStyle
fillcolour='blue' fill color wx.Colour
fillstyle=wx.BRUSHSTYLE_SOLID fill style wx.BrushStyle
legend='' legend string str

Tip

Use np.histogram() to easily create your histogram parameters:

hist_data, binspec = np.histogram(data)
hist_plot = PolyHistogram(hist_data, binspec)

Important

len(binspec) must equal len(hist) + 1.

Warning

All methods except __init__ are private.


Methods



__init__(self, hist, binspec, **attr)


calc_rect(self, y, low, high)

Calculate the rectangle for plotting.



draw(self, dc, printerScale, coord=None)

Draw the bars