DataFrame.boxplot() ignored figsize keyword · Issue #11959 · pandas-dev/pandas (original) (raw)
The DataFrame.boxplot reference documentation says I can change the size of a plot though the figsize
keyword, but this appears not to work.
Using df.plot(kind='box')
does respect figsize
.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import sys
print("pandas version = {}".format(pandas.__version__))
print("python version = {}".format(sys.version))
df = pd.DataFrame(np.random.rand(10, 5), columns=['A', 'B', 'C', 'D', 'E'])
df.plot(kind='box', figsize=(12,8))
plt.show()
df.boxplot(return_type='axes', figsize=(12,8))
plt.show()