title: Patch objects created by plt.hist() do not get drawn
body: <p>Let me preface this by saying that my understanding of matplotlib is limited - I mostly just use <code>plot()</code>, <code>hist()</code> and <code>show()</code> from pyplot. I have a basic understanding of what patch objects are, but (evidently) do not properly understand how to work with them.</p>
  
  <p>When I run the following piece of code (copied from a standard online example):</p>
  
  <pre><code>import numpy as np
  import matplotlib
  from matplotlib.patches import Circle, Wedge, Polygon
  from matplotlib.collections import PatchCollection
  import matplotlib.pyplot as plt
  
  fig, ax = plt.subplots()
  
  resolution = 50  # the number of vertices
  N = 3
  x = np.random.rand(N)
  y = np.random.rand(N)
  radii = 0.1*np.random.rand(N)
  patches = []
  for x1, y1, r in zip(x, y, radii):
      circle = Circle((x1, y1), r)
      patches.append(circle)
  
  x = np.random.rand(N)
  y = np.random.rand(N)
  radii = 0.1*np.random.rand(N)
  theta1 = 360.0*np.random.rand(N)
  theta2 = 360.0*np.random.rand(N)
  for x1, y1, r, t1, t2 in zip(x, y, radii, theta1, theta2):
      wedge = Wedge((x1, y1), r, t1, t2)
      patches.append(wedge)
  
  # Some limiting conditions on Wedge
  patches += [
      Wedge((.3, .7), .1, 0, 360),             # Full circle
      Wedge((.7, .8), .2, 0, 360, width=0.05),  # Full ring
      Wedge((.8, .3), .2, 0, 45),              # Full sector
      Wedge((.8, .3), .2, 45, 90, width=0.10),  # Ring sector
  ]
  
  for i in range(N):
      polygon = Polygon(np.random.rand(N, 2), True)
      #patches.append(polygon)
  
  colors = 100*np.random.rand(len(patches))
  p = PatchCollection(patches, alpha=0.4)
  p.set_array(np.array(colors))
  ax.add_collection(p)
  fig.colorbar(p, ax=ax)
  
  plt.show()
  </code></pre>
  
  <p>it behaves as expected, creating and displaying a variety of random patches: <a href="https://i.stack.imgur.com/pZVAg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pZVAg.png" alt="An example output of the code producing random patches."></a></p>
  
  <p>I also know that, when I use <code>plt.hist()</code> to create and display a histogram, I can save the created patch objects to a list, like so:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  data = [np.random.normal(1) for i in range(10000)]
  num_bins = 50
  
  n, bins, patches = plt.hist(data, num_bins)
  plt.show()
  </code></pre>
  
  <p>This allows me to draw the histogram. But if I do not want to draw it directly, but instead want to pass this <code>patches</code> list to the drawing functionality from the first block of code (for example, after having used functions such as <code>set_height()</code> to make some alterations), I only get an empty plot.</p>
  
  <p>By using things like <code>print(str(len(patches)))</code> or <code>print(str(patches[10].get_height()))</code>, I can confirm that the patch objects are indeed created, and appear to have all the appropriate properties. So why don't I see anything when I try to draw them, using code which I <em>know</em> works for a different list of patches?</p>
  
  <p>(This question was originally about a very specific thing I wanted to do with these patch objects - thanks to a helpful comment from <a href="https://stackoverflow.com/users/4124317/importanceofbeingernest">ImportanceOfBeingErnest</a>, I have now solved my problem in a different way. I have now revised my question to only be about the underlying issue.)</p>