Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ENH: Align titles#27952

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
rcomer merged 5 commits intomatplotlib:mainfromtrananso:align-titles
Apr 4, 2024
Merged

ENH: Align titles#27952

rcomer merged 5 commits intomatplotlib:mainfromtrananso:align-titles
Apr 4, 2024

Conversation

trananso
Copy link
Contributor

@tranansotrananso commentedMar 20, 2024
edited
Loading

PR summary

Adds a functionFigure.align_titles, that aligns titles of axes on the same row.

Closes#22376. Continuation of PRs#25591,#22793

Figure_3

Updated gallery example for align labels

PR checklist

@tranansotrananso marked this pull request as ready for reviewMarch 20, 2024 19:49
@tranansotranansoforce-pushed thealign-titles branch 2 times, most recently from3712c0f to8af2b25CompareMarch 20, 2024 21:28
@tranansotrananso changed the title[ENH] Align titlesENH: Align titlesMar 22, 2024
@trananso
Copy link
ContributorAuthor

Hello, would appreciate having someone look over this PR whenever you have the chance. Thanks!

rcomer reacted with thumbs up emoji

Copy link
Member

@rcomerrcomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for your work on this @AnsonTran, I think it's looking great! I just have some minor comments.

Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think it's a valid question if align_labels should also align the titles

@rcomer
Copy link
Member

I think it's a valid question if align_labels should also align the titles

I don't have an opinion on whether it should but, if it did, I guess it would need to be optional at least for a deprecation period.

I don't think we necessarily need to decide within this PR as it could be done as a follow-up.

@tranansotranansoforce-pushed thealign-titles branch 5 times, most recently from5e09660 to6c8e5d5CompareApril 1, 2024 18:03
@trananso
Copy link
ContributorAuthor

Not sure why this failed

@rcomer
Copy link
Member

That test is currently failing on all the PRs.#28007 is trying to fix it.

Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good except for one nit

trananso reacted with thumbs up emoji
@rcomer
Copy link
Member

The image test is unfortunately failing for a platform that was added since the previous commit#27723. I downloaded the test images and the diff looks like this:
figure_align_titles_tight-failed-diff
I'm very confused how this is a failure.

@trananso
Copy link
ContributorAuthor

I see... Is it just on the new test? or other image comparison tests as well?

@ksunden
Copy link
Member

If I shift the levels to increase the contrast, we see that there are very slight differences in the right hand plot surrounding the drawn line:

diff_levelshifted

These differences are not meaningful, and are likely due to things like rounding modes at the hardware level (it is failing on macos ARM machines).

We had to add tolerances to ~50 image tests in#27723 for similar reasons. This is not that unexpected, just some (usually floating point) calculations are not quite exact and so lead to such things. 0.02 is a pretty low RMS.

Here is an example of adding such tolerance:

https://github.com/QuLogic/matplotlib/blob/48bc62d6088c262b1b5507981f2948d117e63601/lib/matplotlib/tests/test_contour.py#L167-168

The number needs to be at least as big as the number stated in the failure, so with a small buffer I might use something like 0.022 for this test (which says 0.020).

rcomer and trananso reacted with hooray emoji

@rcomer
Copy link
Member

rcomer commentedApr 4, 2024
edited
Loading

Hi @AnsonTran we prefer rebase rather than merge to get the branch up-to-date withmain. Are you happy to do that?

Edit: in case I'm not clear

git fetch upstreamgit rebase upstream/main

@trananso
Copy link
ContributorAuthor

Yes sorry about that, just wanted to figure out what caused the codecov to fail

rcomer reacted with thumbs up emoji

@rcomerrcomer added this to thev3.9.0 milestoneApr 4, 2024
@rcomerrcomer merged commit23ea909 intomatplotlib:mainApr 4, 2024
@tranansotrananso deleted the align-titles branchApril 4, 2024 19:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

@rcomerrcomerrcomer approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.9.0
Development

Successfully merging this pull request may close these issues.

[ENH]: align_titles
4 participants
@trananso@rcomer@ksunden@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp