Spacing of subplots is too small, titles of subplots overlap with tick labels
See original GitHub issueDescribe the bug
Whenever I make an arviz plot using az.plot_trace(data,compact=True)
the title of subplots overlap with tick labels of the respective subplot above.
See plot below, the spacing between subplots seems wrong, don’t know why:
Additional context arviz 0.11.4 macOS 12.1 Python 3.10.1 IPython 7.30.1 VSCode 1.63.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Matplotlib subplots_adjust hspace so titles and xlabels don't ...
With, say, 3 rows of subplots in matplotlib, xlabels of one row can overlap the title of the next. One has to fiddle...
Read more >How to Adjust Spacing Between Matplotlib Subplots - Statology
This tutorial explains how to adjust the spacing between subplots in Matplotlib, ... function tends to cause the subplot titles to overlap:
Read more >Tight Layout guide — Matplotlib 3.6.2 documentation
In matplotlib, the location of axes (including subplots) are specified in normalized figure coordinates. It can happen that your axis labels or titles...
Read more >How to set the spacing between subplots in Matplotlib in ...
Using subplots_adjust() method to set the spacing between subplots. We can use the plt. subplots_adjust() method to change the space between ...
Read more >Tight Layout guide — Matplotlib 1.3.1 documentation
In matplotlib, the location of axes (including subplots) are specified in normalized figure coordinates. It can happen that your axis labels or titles...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
constrained layout is still experimental so matplotlib doesn’t set it to true as a default (yet?). I’m not sure there is a way to fix this within ArviZ. We do provide those opinionated extra themes, but we rely on matplotlib styles so using those changes the look of any matplotlib/seaborn/… plot, so loading one of those at import on our side would probably be confusing. plots would change appearance with no apparent reason to many users importing arviz.
we have some ideas for new pages in the documentation related to plotting (https://github.com/arviz-devs/arviz/issues/1488) covering how to overlay plots for example. we could have a section on constrained_layout/tight_layout. Or maybe faq page with common questions on plotting, stats, inferencedata…?
Thanks for the tips!
Is there a reason why I need to custom set these parameters? Are my defaults messed up for some reason or does every user have to do this?
If it’s just me, then we can close this issue, but if it affects others, would it be possible to fix this within arviz?