BUG: boxplot does not set limits of axis · Issue #5517 · pandas-dev/pandas (original) (raw)

DataFrame.boxplot fails to properly set the limits of the y-axis is this example:

df = pd.DataFrame({'X': [1, 0, 1, 0], 'Y': [1, 0, 1, 0], 'Z': [1, 0, 1, 0], #'M': [1, 0, 1, 0], 'B': list("XXYY")}, index=list("UUVV"))

print df """ B X Y Z U X 1 1 1 U X 0 0 0 V Y 1 1 1 V Y 0 0 0 """

df.boxplot(by='B')

I would expect the y-axis to go from 0 to 1, not -0.06 to 0.06.
If I uncomment the M it works.

I use pandas 0.12.0 and matplotlib 1.3.1