I am trying to do a matplolib figure with some padding between the axis and the actual plot.
Here is my example code :
import numpy as np
import matplotlib.pyplot as plt
fig, ax = plt.subplots(1)
x = np.linspace(0, 1)
y = np.sin(4 * np.pi * x) * np.exp(-5 * x)
plt.plot(x, y, 'r')
plt.grid(True)
plt.show()
And here is what I am trying to get :