So since I wanted some space on the borders of my graph, I did this

really extremely convoluted thing, which apparently works...

I get a 10% more area on each side, but I'm quite sure there's a better

way to this, right?

I didn't find any function to pass an increment to the size that's why I

did this mess...

--8<---------------cut here---------------start------------->8---

old_axes = plt.axis()

sizes = old_axes[1] - old_axes[0], old_axes[3] - old_axes[2]

offset = lambda x: int((float(x) / 10))

new_axes = []

for i in range(len(old_axes)):

new_val = old_axes[i] + (((-1) ** (i + 1)) * offset(sizes[i % 2]))

new_axes.append(new_val)

plt.axis(new_axes)

--8<---------------cut here---------------end--------------->8---