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

Commit0ea8958

Browse files
committed
add tim's suggestion
1 parentd99c8e0 commit0ea8958

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

‎lib/matplotlib/axes/_axes.py

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8350,10 +8350,10 @@ def matshow(self, Z, **kwargs):
83508350

83518351
@_api.make_keyword_only("3.9","vert")
83528352
@_preprocess_data(replace_names=["dataset"])
8353-
defviolinplot(self,dataset,positions=None,vert=None,widths=0.5,
8354-
showmeans=False,showextrema=True,showmedians=False,
8355-
quantiles=None,points=100,bw_method=None,side='both',
8356-
orientation=None):
8353+
defviolinplot(self,dataset,positions=None,orientation='vertical',
8354+
vert=None,widths=0.5,showmeans=False,showextrema=True,
8355+
showmedians=False,quantiles=None,points=100,
8356+
bw_method=None,side='both',):
83578357
"""
83588358
Make a violin plot.
83598359
@@ -8475,9 +8475,9 @@ def _kde_method(X, coords):
84758475
showmedians=showmedians,side=side)
84768476

84778477
@_api.make_keyword_only("3.9","vert")
8478-
defviolin(self,vpstats,positions=None,vert=None,widths=0.5,
8479-
showmeans=False,showextrema=True,showmedians=False,side='both',
8480-
orientation=None):
8478+
defviolin(self,vpstats,positions=None,orientation=None,
8479+
vert=None,widths=0.5,showmeans=False,showextrema=True,
8480+
showmedians=False,side='both'):
84818481
"""
84828482
Draw a violin plot from pre-computed statistics.
84838483
@@ -8599,23 +8599,17 @@ def violin(self, vpstats, positions=None, vert=None, widths=0.5,
85998599
datashape_message= ("List of violinplot statistics and `{0}` "
86008600
"values must have the same length")
86018601

8602+
# vert and orientation parameters are linked until vert's
8603+
# deprecation period expires. If both are selected,
8604+
# vert takes precedence.
86028605
ifvertisnotNone:
86038606
_api.warn_deprecated(
86048607
"3.10",
86058608
name="vert: bool",
86068609
alternative="orientation: {'vertical', 'horizontal'}"
8607-
)
8608-
8609-
# vert and orientation parameters are linked until vert's
8610-
# deprecation period expires. If both are selected,
8611-
# vert takes precedence.
8612-
ifvertorvertisNoneandorientationisNone:
8613-
orientation='vertical'
8614-
elifvertisFalse:
8615-
orientation='horizontal'
8616-
8617-
iforientationisnotNone:
8618-
_api.check_in_list(['horizontal','vertical'],orientation=orientation)
8610+
)
8611+
orientation='vertical'ifvertelse'horizontal'
8612+
_api.check_in_list(['horizontal','vertical'],orientation=orientation)
86198613

86208614
# Validate positions
86218615
ifpositionsisNone:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp