I have a figure with a fixed size and want to change the size of the plot inside it, i.e., add white space around it. Most questions online deal with removing white space or subplots, which I don't have.
My plotting code is
fig = plt.figure(figsize=(14,10))
plt.plot(n, y)
plt.savefig('figure.png', bbox_inches='tight', dpi=200)
so really nothing special. I already tried margins and tight_layout(pad = X) but nothing worked.
You can adjust the subplot parameters using
subplots_adjustby adjusting the values for left, right, top, and bottom, you can control the amount of white space added around the plot.