I have a code snippet which plots a simple error bar using matplotlib. Before saving it, the plt has a size of 640x480:
print(plt.gcf())
>>> Figure(640x480)
For saving the plt, I'm using this: plt.savefig("./tmp.png", bbox_inches="tight", pad_inches=0). However, as expected, the saved figure size is different from 640x480 as it is set to have a tight layout.
Now, is there a way to find the to-be-saved figure size before actually saving it?