title: How to code bar charts with patterns along with colours in Python?
body: <p>The following code prints a bar chart with four colours:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  barlist=plt.bar([1,2,3,4], [1,2,3,4])
  barlist[0].set_color('r')
  barlist[1].set_color('g')
  barlist[2].set_color('y')
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Iz8iL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Iz8iL.png" alt="enter image description here"></a></p>
  
  <p>The problem is that when printed in black and white, they would look very much alike. Hence my intention would be to produce a graph somewhat like this:</p>
  
  <p><a href="https://i.stack.imgur.com/EpMPj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EpMPj.png" alt="enter image description here"></a></p>
  
  <p>It does not <em>have</em> to look just like the above (forgive the sloppy illustration), but the idea is to have each bar look different when seen in grayscale.</p>
  
  <p>Is there any way this can be implemented in Python?</p>