title: Pandas plot bar without NaN values spaces
body: <p>I have a pandas DataFrame containing NaN values. I want to make a bar plot with the indexes in the x axys, and a bar for each column, grouped by the indexes. I would like to plot only the bars with an actual value. </p>
  
  <p>As far as I'm trying, from this example:</p>
  
  <pre><code>df = pandas.DataFrame({'foo':[1,None,None], 'bar':[None,2,0.5], 'col': [1,1.5,None]}, index=["A","B","C"])
  df.plot.bar()
  plt.show()
  </code></pre>
  
  <p>I can produce this plot:</p>
  
  <p><a href="https://i.stack.imgur.com/vGhRS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vGhRS.png" alt="enter image description here"></a></p>
  
  <p>What I would like is to remove the blank spaces left for the NaN columns. So to compact the bars and center the group above the x tick.</p>