title: Append matplotlib histogram plots to a list, without overwriting
body: <p>I am trying to write a function, such that it creates multiple histograms(using matplotlib.pyplot) using a for loop on some data. I append these plots to a list, and the list is returned.
  But when I try to use show() on each of the plots, they are all the same plot, and all the plots are being overwritten.</p>
  
  <p>I have tried using plt.clf() at the end of the for loop, but it does not work for me.</p>
  
  <pre><code>for data in data_list:
      n, bins, patches = plt.hist(x=data, bins='auto', color=color,
                                      alpha=0.7, rwidth=0.85)
      plt.xlabel('Values')
      plt.ylabel('Frequency')
      plt.grid(axis='y', alpha=0.55)
      plots.append(plt)
  </code></pre>