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

Add side option to violinplot#27815

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
ksunden merged 1 commit intomatplotlib:mainfromanjabeck:side-option-violinplot
Mar 1, 2024

Conversation

anjabeck
Copy link

@anjabeckanjabeck commentedFeb 23, 2024
edited
Loading

PR summary

This PR adds aside parameter to the violin plot which allows to plot only one half of the violin.
I added an image comparison for vertical and horizontal violins and two subplots in the gallery example.

closes#27812

PR checklist

@anjabeckanjabeck marked this pull request as draftFebruary 23, 2024 16:01
@anjabeckanjabeck changed the titleAdd side option to violinplotDraft: Add side option to violinplotFeb 23, 2024
Copy link

@github-actionsgithub-actionsbot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join uson gitter for real-time discussion.

For details on testing, writing docs, and our review process, please seethe developer guide

We strive to be a welcoming and open project. Please follow ourCode of Conduct.

@anjabeckanjabeck changed the titleDraft: Add side option to violinplotAdd side option to violinplotFeb 23, 2024
ksunden
ksunden previously requested changesFeb 23, 2024
Copy link
Member

@ksundenksunden left a comment

Choose a reason for hiding this comment

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

Fairly minor things:

Testing standard practices (using new style, random seed)

  • You were matching local examples, but we do have preferences for new tests
    Using helper function for validation.

As this is still in draft, didn't look too hard at the docs changes yet, but figured I'd point to some of our tooling early on.

@anjabeckanjabeck marked this pull request as ready for reviewFebruary 23, 2024 18:06
@ksundenksunden dismissed theirstale reviewFebruary 23, 2024 18:07

comments addressed

@anjabeck
Copy link
Author

Can I fix the failed check without creating a new PR? (I changed the test image half-way through)

@ksunden
Copy link
Member

Yes, you can (and in fact opening a new PR alone would not even prevent the flag):

We have a guide on interactive rebasing here:

https://matplotlib.org/devdocs/devel/development_workflow.html#rewrite-commit-history

At minimum you'd need to squash together the two commits that added images. The easiest way to do that is probably to just squash all the commits down to one commit (its a small enough change for that)

If you do not want to mess with it yourself, we can do it as well.

anjabeck reacted with thumbs up emoji

@anjabeckanjabeckforce-pushed theside-option-violinplot branch 2 times, most recently from7a252c3 todc97efbCompareFebruary 23, 2024 18:44
@anjabeck
Copy link
Author

I tried myself, failed a little, but I think I managed to squash the commits.

Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

As one can see in the image, there's a gap where extrema line and vertical line meet. We could investigate whether hard-codingcapstyle="projecting" makes sense for extrema lines of half violins.

https://matplotlib.org/devdocs/gallery/lines_bars_and_markers/capstyle.html#capstyle

@anjabeckanjabeckforce-pushed theside-option-violinplot branch 2 times, most recently fromcd8ef8d to50d2950CompareFebruary 28, 2024 13:34
@anjabeckanjabeckforce-pushed theside-option-violinplot branch from50d2950 to2782e0eCompareMarch 1, 2024 08:47
add test for side option in violinplotadd whats new for side in violinplotadd violin side option to _axes.pyi and pyplot.pyuse side option in violinplot also for linesadd side option to violinplot exampleuse newer style and correct seed in violin testupdate imagechange option naminguse proper syntax for code in violin docsCo-authored-by: Kyle Sunden <git@ksunden.space>add changed violinplots (capstyle=projecting)hardcode capstyle only for left-right violinsfix typo
@anjabeckanjabeckforce-pushed theside-option-violinplot branch from2782e0e to0adab7bCompareMarch 1, 2024 08:57
Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the patience to go through all the review cycles!

@timhoffmtimhoffm added this to thev3.9.0 milestoneMar 1, 2024
@anjabeck
Copy link
Author

LGTM. Thanks for the patience to go through all the review cycles!

Thanks to you! This was very pleasant and I will definitely contribute to matplotlib in the future now that I know how you do things :)

timhoffm reacted with hooray emojitimhoffm and rcomer reacted with heart emoji

@ksundenksunden merged commitd57fa97 intomatplotlib:mainMar 1, 2024
@ksunden
Copy link
Member

Congrats on your merged PR! Thanks

@sarantisaranti mentioned this pull requestMar 6, 2024
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

@ksundenksundenksunden approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Documentation: examplesfiles in galleries/examplestopic: pyplot API
Projects
None yet
Milestone
v3.9.0
Development

Successfully merging this pull request may close these issues.

[ENH]: Add split feature for violin plots
3 participants
@anjabeck@ksunden@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp