garrettj403 / SciencePlots

Matplotlib styles for scientific plotting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I ensure that my figure size is consistent with the "figsize" passed in plt.subplot?

yzbyx opened this issue · comments

The relavent code is here below:

fig, ax = plt.subplots(1, 2, figsize=figsize)

fig.subplots_adjust(wspace=0.3, bottom=0.22, top=0.95, right=0.88, left=0.1)

fig.savefig(r"E:\test.tif", dpi=500, pil_kwargs={"compression": "tiff_lzw"})

This problem usually occurs when figure has long axis number labels, figure seems to be readjusted.

However, when I use seaborn or pure matplotlib, the issue doesn't happen.

Please, invest time in filling out the bug report accordingly. Which styles are you using?

Thank you for your reply. I have commited a new issue.

Thanks to you, I'm closing this one then.
I will have a look at it later/on the following days. I'm very busy these days.