%matplotlib inline
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import pandas as pd
print "numpy: ", np.__version__
print "pandas: ", pd.__version__
print "matplotlib: ", matplotlib.__version__
numpy: 1.7.1 pandas: 0.12.0-213-gdc3ead3 matplotlib: 1.2.1
df = pd.DataFrame({'A':[1,3,2,5,4,7,6], 'B':[1,1,1,1,2,2,2]})
fig, ax = plt.subplots()
df['A'].plot(ax=ax)
<matplotlib.axes.AxesSubplot at 0x89ebe10>
Try to change the y limits => it works
ax.set_ylim(0,20)
fig
fig, ax = plt.subplots()
df.boxplot('A', 'B', ax=ax)
<matplotlib.axes.AxesSubplot at 0x8bebc18>
Now the same with a boxplot => it does not work
ax.set_ylim(0,20)
fig