title: How to remove an histogram in Matplotlib
body: <p>I am used to work with plots that change over the time in order to show differences when a parameter is changed. Here I provide an easy example </p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  fig = plt.figure()
  ax = fig.add_subplot(111)
  ax.grid(True)
  
  x = np.arange(-3, 3, 0.01)
  
  for j in range(1, 15):
      y = np.sin(np.pi*x*j) / (np.pi*x*j)
      line, = ax.plot(x, y)
      plt.draw()
      plt.pause(0.5)
      line.remove()
  </code></pre>
  
  <p>You can clearly see that increasing the paramter j the plot becames narrower and narrower.
  Now if I want to do the some job with a counter plot than I just have to remove the comma after "line". From my understanding this little modification comes from the fact that the counter plot is not an element of a tuple anymore, but just an attribute as the counter plot completely "fill up" all the space available.</p>
  
  <p>But it looks like there is no way to remove (and plot again) an histogram. Infact if type </p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  fig = plt.figure()
  ax = fig.add_subplot(111)
  ax.grid(True)
  
  x = np.random.randn(100)
  
  for j in range(15):
      hist, = ax.hist(x, 40)*j
      plt.draw()
      plt.pause(0.5)
      hist.remove()
  </code></pre>
  
  <p>It doesn't matter whether I type that comma or not, I just get a message of error.
  Could you help me with this, please?</p>