title: Cannot change hatch density using contourf in Matplotlib 2.2.2
body: <p>I want to change the density of hatch lines using Matplotlib v2.2.2 and the <code>contourf()</code> function (specifically, I want to increase the density). I have read that you can increase the density of a hatch by increasing how many times you use the hatch figure (<em>e.g.</em> replace <code>x</code> with <code>xx</code>). However, that change is having no effect for me. My backend is <code>Qt5Agg</code>, and I'm using Python v3.6.4.</p>
  
  <p><strong>MWE:</strong></p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy             as np
  
  def main():
      x = np.arange( 0, 1.01, 0.01 )
      X, Y = np.meshgrid( x, x )
      Z = X + Y
  
      fig, (ax1, ax2) = plt.subplots( 1, 2 )
      ax1.contourf( X, Y, Z, [1,2], colors='none', hatches='x' )
      ax2.contourf( X, Y, Z, [1,2], colors='none', hatches='xx' )
  
      plt.show()
  
  main()
  </code></pre>
  
  <p>which produces the output</p>
  
  <p><a href="https://i.stack.imgur.com/MVz4q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MVz4q.png" alt="hatch density example"></a></p>
  
  <p><strong>Possible Duplicates:</strong></p>
  
  <p><a href="https://stackoverflow.com/q/4745937/8516804">This question</a> is 7 years old and requires defining a custom class. Is this still the best option?</p>
  
  <p><a href="https://stackoverflow.com/q/47880072/8516804">This question</a> is basically exactly what I'm asking, but the MWE was a bit complicated, and didn't attract any answers.</p>