@@ -8350,10 +8350,10 @@ def matshow(self, Z, **kwargs):
8350
8350
8351
8351
@_api .make_keyword_only ("3.9" ,"vert" )
8352
8352
@_preprocess_data (replace_names = ["dataset" ])
8353
- def violinplot (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
+ def violinplot (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' , ):
8357
8357
"""
8358
8358
Make a violin plot.
8359
8359
@@ -8475,9 +8475,9 @@ def _kde_method(X, coords):
8475
8475
showmedians = showmedians ,side = side )
8476
8476
8477
8477
@_api .make_keyword_only ("3.9" ,"vert" )
8478
- def violin (self ,vpstats ,positions = None ,vert = None , widths = 0.5 ,
8479
- showmeans = False , showextrema = True , showmedians = False ,side = 'both' ,
8480
- orientation = None ):
8478
+ def violin (self ,vpstats ,positions = None ,orientation = None ,
8479
+ vert = None , widths = 0.5 , showmeans = False ,showextrema = True ,
8480
+ showmedians = False , side = 'both' ):
8481
8481
"""
8482
8482
Draw a violin plot from pre-computed statistics.
8483
8483
@@ -8599,23 +8599,17 @@ def violin(self, vpstats, positions=None, vert=None, widths=0.5,
8599
8599
datashape_message = ("List of violinplot statistics and `{0}` "
8600
8600
"values must have the same length" )
8601
8601
8602
+ # vert and orientation parameters are linked until vert's
8603
+ # deprecation period expires. If both are selected,
8604
+ # vert takes precedence.
8602
8605
if vert is not None :
8603
8606
_api .warn_deprecated (
8604
8607
"3.10" ,
8605
8608
name = "vert: bool" ,
8606
8609
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
- if vert or vert is None and orientation is None :
8613
- orientation = 'vertical'
8614
- elif vert is False :
8615
- orientation = 'horizontal'
8616
-
8617
- if orientation is not None :
8618
- _api .check_in_list (['horizontal' ,'vertical' ],orientation = orientation )
8610
+ )
8611
+ orientation = 'vertical' if vert else 'horizontal'
8612
+ _api .check_in_list (['horizontal' ,'vertical' ],orientation = orientation )
8619
8613
8620
8614
# Validate positions
8621
8615
if positions is None :