Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
BUG: fixed weird case where boxplot whiskers went inside box #1855
This PR takes care of a case where an oddly-distributed and small dataset causes some mayhem in the boxplots. An example that reproduces this error in the current
import numpy as np import matplotlib.pyplot as plt x = np.array([3, 9000, 150, 88, 350, 200000, 1400, 960], dtype=np.float64) fig, ax1 = plt.subplots() ax1.boxplot(x) ax1.set_yscale('log') ax1.yaxis.grid(False, which='minor') ax1.xaxis.grid(False) plt.show()
The changes to axes.boxplot where very minor and I've include an new test with baseline images as well. Thanks for the effort, y'all.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Great effort @phobson, and a test too! You make my life easy :) Would you be able to add
As an aside, I have no idea if the new output is 'correct', so I assume you are happy that it is.