garrettj403 / SciencePlots

Matplotlib styles for scientific plotting
MIT License
7.08k stars 708 forks source link

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

Closed yzbyx closed 6 months ago

yzbyx commented 6 months ago

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.

echedey-ls commented 6 months ago

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

yzbyx commented 6 months ago

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

echedey-ls commented 6 months ago

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.