Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Added test for ax.violin#27486
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
base:main
Are you sure you want to change the base?
Added test for ax.violin#27486
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
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.
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.
Please do not run an autoformatter on the entire file. this makes it very hard for us to actually see what the changes proposedhere are. Please revert all unrelated changes here. (as much as I personally likeblack
style, this project does not use it and we don't like changing large amounts of code for purely stylistic reasons)
This test does not usedatetime
s, as is the explicit goal of the tests in this file, as such it is not testing what we are setting out to test.
However, I actually think I may err towards just deleting this test, for the reasons laid out in#27485 (comment) (plus the fact that the things Ido still want to test are equally tested by testingviolinplot
)
@@ -755,8 +793,32 @@ def test_triplot(self): | |||
@pytest.mark.xfail(reason="Test for violin not written yet") | |||
@mpl.style.context("default") | |||
def test_violin(self): | |||
fig, ax = plt.subplots() | |||
ax.violin(...) | |||
plt, ax = plt.subplots(1, 1) |
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.
plt,ax=plt.subplots(1,1) | |
fig,ax=plt.subplots(1,1) |
This is flaggingflake8
because it is reusing the name forpyplot
, the idiomatic name for this variable isfig
, as it is aFigure
object.
PR summary
Added tests for ax.violin in test_datetime.py, 2 example cases are provided.
Parent issue to expand test coverage see issue#26864
added two randomly generated distribution and plot them with ax.violin()