title: Matplotlib Margins when plotting with Pandas
body: <p>I'm trying to set margins so all my points are visible when plotting with matplotlib but its doesn't seem to correctly add them. Below is my code and output.</p>
  
  <p>I'm using IPython with the %matplotlib magic command.</p>
  
  <p>Is there something that I'm doing obviously wrong?</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import pandas as pd
  
  
  d = pd.DataFrame(pd.Series(range(10))*2)
  a = d.plot(style = "o-")
  a.set_axis_bgcolor('g') 
  a.margins(.05)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/PE263.png" alt="Matplotlib Output"></p>