Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: use with subplots #3

Open
arthurmloureiro opened this issue Jan 19, 2022 · 1 comment
Open

Feature request: use with subplots #3

arthurmloureiro opened this issue Jan 19, 2022 · 1 comment

Comments

@arthurmloureiro
Copy link

autosize() is simply magical! But I am struggling to get it working with plt.subplots in matplotlib.

My script goes like:

fig, axis = plt.subplots(figsize=(6,6), ncols=4, nrows=4)
for i in range(0, 4):
            for j in range(0, 4):
            # a class that makes plots in certain axis:
           gec.PlotClsHDP(i, j, ax=axis[i,j], **kwargs)
autosize(fig)
plt.show()

but the result is the following:
Screenshot 2022-01-19 at 18 21 20

@andrewcharlesjones
Copy link
Owner

Hi Arthur, thanks for your note. Glad you're finding it's useful!

This is a good point about it not working well with subplots. I guess maybe we should rescale the sizes depending on the number/size of the subplots. But there's also the risk that making the fonts smaller would just put us back in the position where they're illegible.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants