from pylab import rcParams
rcParams[\'figure.figsize\'] = (10, 10)
This works fine for histogram plots but not for factor plots. sns.factorplot (.....
The figure size can be modified by first creating a figure and axis and passing this as a parameter to the seaborn plot:
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
fig, ax = plt.subplots(figsize=(10, 10))
df = pd.DataFrame({
'product' : ['A', 'A', 'A', 'B', 'B', 'C', 'C'],
'close' : [1, 1, 0, 1, 1, 1, 0],
'counts' : [3, 3, 3, 2, 2, 2, 2]})
sns.factorplot(y='counts', x='product', hue='close', data=df, kind='bar', palette='muted', ax=ax)
plt.close(2) # close empty figure
plt.show()
When using an Axis grids type plot, seaborn will automatically create another figure. A workaround is to close the empty second figure.