title: How to plot bar graphs with same X coordinates side by side ('dodged')
body: <pre><code>import matplotlib.pyplot as plt
  
  gridnumber = range(1,4)
  
  b1 = plt.bar(gridnumber, [0.2, 0.3, 0.1], width=0.4,
                  label="Bar 1", align="center")
  
  b2 = plt.bar(gridnumber, [0.3, 0.2, 0.2], color="red", width=0.4,
                  label="Bar 2", align="center")
  
  
  plt.ylim([0,0.5])
  plt.xlim([0,4])
  plt.xticks(gridnumber)
  plt.legend()
  plt.show()
  </code></pre>
  
  <p>Currently b1 and b2 overlap each other. How do I plot them separately like so:</p>
  
  <p><img src="https://i.stack.imgur.com/C0HMP.gif" alt="enter image description here"></p>