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
[FIX] Preventing plot title overlapping content #2804
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2804 +/- ##
==========================================
+ Coverage 88.54% 88.56% +0.02%
==========================================
Files 100 100
Lines 13392 13392
Branches 2608 2608
==========================================
+ Hits 11858 11861 +3
+ Misses 953 951 -2
+ Partials 581 580 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @OliverWarrington ! 👍
Could you just add a whatsnew entry? (in file doc/whats_new.rst
)
3d89740
to
d462d62
Compare
I think it's done. @NicolasGensollen please could you make sure this is fine? I get a little confused in the updating pull requests world! |
LGTM, but I think we should trigger a full doc rebuild to check that example figs render well... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @OliverWarrington !
I just have a very small request (see below).
When you commit this, could you put "[circle full]" somewhere in your commit message? This will trigger a full build on circleCI as mentioned by @bthirion.
If the doc builds correctly, we should be good to merge! 🎉
doc/whats_new.rst
Outdated
@@ -7,6 +7,7 @@ NEW | |||
Fixes | |||
----- | |||
|
|||
- Fix plot title overlapping image content. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the issue number in the description here? It might be hard to know what was fixed otherwise.
Great, thanks! |
The problem now is that the title gets cut out of the img on plot_stat_map examples (see CircleCI). |
Ah yep, I see what you mean. I guess the figure size works differently in Jupyter? I'll have another go! |
I think part of the difficulty comes from the fact that the nilearn plotting functions make extensive use of |
addressing that would be a bigger change than was intended in this PR though, so maybe here if there really isn't enough space you can slightly increase the figure size (the |
Thanks @jeromedockes, I'll try increasing the default size. Is there a way to get the same outputs as running CircleCI when I'm checking my changes locally? The outputs of running the plotting examples either in jupyter or just as a script look different to me from the CircleCI outputs. |
@OliverWarrington if you want to check the rendering of the docs locally, you can build it by running |
@jeromedockes I was wondering regarding your proposed solution of changing the hardcoded nilearn/nilearn/plotting/displays/_slicers.py Lines 136 to 138 in 1b79941
Do you think it could work? |
I think so! although it probably isn't a big deal to increase a bit the figure size in all cases |
Closes #2054.
Changes proposed in this pull request: