title: Change Figure Size in Matplotlib
body: <p>This is my code and I want to make the plot bigger so it's easier to read. Here I'm trying to get feature importance based on mean decrease in impurity. I'm getting some output but since my barplot has 63 bins, I want it much bigger. I tried everything that is commented. Can someone please suggest how can I make this bar plot more readable? <a href="https://i.stack.imgur.com/43chG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/43chG.png" alt="enter image description here" /></a></p>
  <pre><code>import pandas as pd
  from matplotlib.pyplot import figure
  
  # fig.set_figheight(20)
  # fig.set_figwidth(20)
  #plt_1 = plt.figure(figsize=(20, 15), dpi = 100)
  
  forest_importances = pd.Series(importances, index=feature_names)
  fig, ax = plt.subplots()
  forest_importances.plot.bar(yerr=std, ax=ax)
  ax.set_title(&quot;Feature importances using MDI&quot;)
  ax.set_ylabel(&quot;Mean decrease in impurity&quot;)
  
  # fig = plt.figure()
  
  fig.tight_layout()
  plt.show()
  </code></pre>