Creates a PolyBoxPlot object.
Raw data to create a box plot from.
sequence of int or float
keyword attributes
Keyword and Default 
Description 
Type 


edge color 


edge width 
float 

edge style 


legend string 
str 
Note
np.NaN
and np.inf
values are ignored.
TODO
[ ] Figure out a better way to get multiple box plots sidebyside (current method is a hack).
[ ] change the X axis to some labels.
[ ] Change getClosestPoint to only grab box plot items and outlers? Currently grabs every data point.
[ ] Add more customization such as Pens/Brushes, outlier shapes/size, and box width.
[ ] Figure out how I want to handle logy: log data then calcBP? Or should I calc the BP first then the plot it on a log scale?
wx.lib.plot.polyobjects.PolyPoints
Initialize self. See help(type(self)) for accurate signature. 

Returns bounding box for the plot. 

Box plot points 

Calculates the outliers. Must be called after calcBpData. 

Draws a box plot on the DC. 

Returns the index of closest point on the curve, pointXY, 

Width and Height of Marker 
PolyBoxPlot
(PolyPoints)¶Creates a PolyBoxPlot object.
data (sequence of int or float) – Raw data to create a box plot from.
**attr – keyword attributes
Keyword and Default 
Description 
Type 


edge color 


edge width 
float 

edge style 


legend string 
str 
Note
np.NaN
and np.inf
values are ignored.
TODO
[ ] Figure out a better way to get multiple box plots sidebyside (current method is a hack).
[ ] change the X axis to some labels.
[ ] Change getClosestPoint to only grab box plot items and outlers? Currently grabs every data point.
[ ] Add more customization such as Pens/Brushes, outlier shapes/size, and box width.
[ ] Figure out how I want to handle logy: log data then calcBP? Or should I calc the BP first then the plot it on a log scale?
__init__
(self, points, **attr)¶Initialize self. See help(type(self)) for accurate signature.
boundingBox
(self)¶Returns bounding box for the plot.
Override method.
calcBpData
(self, data=None)¶Box plot points:
Median (50%) 75% 25% low_whisker = lowest value that’s >= (25%  (IQR * 1.5)) high_whisker = highest value that’s <= 75% + (IQR * 1.5)
outliers are outside of 1.5 * IQR
The data to plot
Descriptive statistics for data: (min_data, low_whisker, q25, median, q75, high_whisker, max_data)
calcOutliers
(self, data=None)¶Calculates the outliers. Must be called after calcBpData.
draw
(self, dc, printerScale, coord=None)¶Draws a box plot on the DC.
The following draw order is required:
First the whisker line
Then the IQR box
Lasly the median line.
This is because
The whiskers are drawn as single line rather than two lines
The median line must be visible over the box if the box has a fill.
Other than that, the draw order can be changed.
getClosestPoint
(self, pntXY, pointScaled=True)¶Returns the index of closest point on the curve, pointXY, scaledXY, distance x, y in user coords.
Override method.
if pointScaled == True, then based on screen coords if pointScaled == False, then based on user coords
getSymExtent
(self, printerScale)¶Width and Height of Marker