-
Notifications
You must be signed in to change notification settings - Fork 128
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
Fixing overlapping labels in subplots from Fit Script Generator #38823
base: main
Are you sure you want to change the base?
Conversation
943b041
to
98bbed5
Compare
I think we could solve this in a more universal way. It seems to me that the plot titles themselves could be shortened, they contain a lot of redundant information. So |
Thanks for the review @jhaigh0. I have applied the suggested change and just had a look how it would look like for an example when there are 6 plots with Instead, we can keep the titles replaced with the better legends as you've suggested and have fig.subplots_adjust(hspace=0, wspace=0.5) without doing tight_layout which will generate a plot like the one below. unless you could suggest a different approach, I can apply this change if you are happy. |
@warunawickramasingha
That way you should still be able to use tight layout |
Description of work
There had been an overlap of subplots labels generated from the Fit Script Generator Interface and this PR is fixing that.
Fixes #37375.
To test:
Plots before the fix:

Plots after the fix:

Note: Calling
fig.tight_layout()
beforefig.subplots_adjust()
could have fixed the issue. But it makes each sub plot looks smaller when the number of subplots are increased and hence it was not used.Reviewer
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.