I want to add margins to the plot so that rather than having the 0.0 be at the edge corner, the 0.0 is slightly away from the corner. I'm looking at the docs and it would seem that adding this line plt.margins(x_margin, y_margin) should add padding. My output below however still is the same regardless of that function call and still is missing margin padding.
Example code to produce:
import matplotlib.pyplot as plt
plt.plot([0, 0.1, 0.3, 0.5, 0.7, 0.9, 1], [0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22], 'ro')
plt.axis([0, 1, 0.15, 0.3])
# Create a 10% (0.1) and 10% (0.1) padding in the
# x and y directions respectively.
plt.margins(0.1, 0.1)
plt.show()
