title: Matplotlib "ValueError: Image size of .... less than 2^16 in each direction" with log scale
body: <p>Toy problem:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  x = [10, 11, 12, 15]
  y = [5, 7, 4, 3]
  z = ["a", "b", "c", "d"]
  
  fig, ax = plt.subplots(figsize = (6, 6))
  ax.bar(x, y)
  
  for i, j in enumerate(zip(y, z)):
      plt.text(i + 10, j[0] - 0.3, s = str(j[0]), color = 'white')
      plt.text(i + 10, j[0] + 0.1, s = str(j[1]), color = 'black')
  
  plt.show()
  </code></pre>
  
  <p>This creates a plot, with actual values as text labels, nice stuff. Text labels aren't aligned above each bar though since there's a gap in x values.</p>
  
  <p><img src="https://imgur.com/HeK0U01" alt="first plot"></p>
  
  <p>No worries, can insert some data:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  x = [10, 11, 12, 15]
  y = [5, 7, 4, 3]
  z = ["a", "b", "c", "d"]
  
  x.insert(3, 13)
  x.insert(4, 14)
  y.insert(3, 0)
  y.insert(4, 0)
  z.insert(3, ' ')
  z.insert(4, ' ')
  
  fig, ax = plt.subplots(figsize = (6, 6))
  ax.bar(x, y)
  # ax.set_yscale('log')
  
  for i, j in enumerate(zip(y, z)):
      plt.text(i + 10, j[0] - 0.3, s = str(j[0]), color = 'white')
      plt.text(i + 10, j[0] + 0.1, s = str(j[1]), color = 'black')
  
  plt.show()
  </code></pre>
  
  <p><img src="https://imgur.com/ThDrME3" alt="second plot"></p>
  
  <p>Sweet, just what we wanted, gorgeous plot.</p>
  
  <p>However...</p>
  
  <pre><code># ax.set_yscale('log')
  </code></pre>
  
  <p>If set_yscale('log') is un-commented:</p>
  
  <pre><code>ValueError: Image size of 384x806494 pixels is too large. It must be less than 2^16 in each direction.
  </code></pre>
  
  <p>So you can't have a 0 in the y values because log 0 is undefined. Makes sense.</p>
  
  <p>Except now, I can't fix the original problem, since 0 can't be used to represent an empty bar.</p>
  
  <p>log 1 is = 0, but if you insert 1, a bar is still shown, because reasons I guess?</p>
  
  <p>Are there any workarounds for this with matplotlib version '2.2.3'? If 0 can't be used, what can?</p>
  
  <p>Thanks</p>