@@ -3819,15 +3819,16 @@ def apply_mask(arrays, mask):
3819
3819
@_api .make_keyword_only ("3.9" , "notch" )
3820
3820
@_preprocess_data ()
3821
3821
@_api .rename_parameter ("3.9" , "labels" , "tick_labels" )
3822
- def boxplot (self , x , notch = None , sym = None , vert = None , whis = None ,
3823
- positions = None , widths = None , patch_artist = None ,
3824
- bootstrap = None , usermedians = None , conf_intervals = None ,
3822
+ def boxplot (self , x , notch = None , sym = None , vert = None ,
3823
+ orientation = 'vertical' , whis = None , positions = None ,
3824
+ widths = None , patch_artist = None , bootstrap = None ,
3825
+ usermedians = None , conf_intervals = None ,
3825
3826
meanline = None , showmeans = None , showcaps = None ,
3826
3827
showbox = None , showfliers = None , boxprops = None ,
3827
3828
tick_labels = None , flierprops = None , medianprops = None ,
3828
3829
meanprops = None , capprops = None , whiskerprops = None ,
3829
3830
manage_ticks = True , autorange = False , zorder = None ,
3830
- capwidths = None , label = None , orientation = None ):
3831
+ capwidths = None , label = None ):
3831
3832
"""
3832
3833
Draw a box and whisker plot.
3833
3834
@@ -3887,6 +3888,12 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3887
3888
If True, plots the boxes vertically.
3888
3889
If False, plots the boxes horizontally.
3889
3890
3891
+ orientation : {'vertical', 'horizontal'}, default: 'vertical'
3892
+ If 'horizontal', plots the boxes horizontally.
3893
+ Otherwise, plots the boxes vertically.
3894
+
3895
+ .. versionadded:: 3.10
3896
+
3890
3897
whis : float or (float, float), default: 1.5
3891
3898
The position of the whiskers.
3892
3899
@@ -3972,12 +3979,6 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3972
3979
zorder : float, default: ``Line2D.zorder = 2``
3973
3980
The zorder of the boxplot.
3974
3981
3975
- orientation : {'vertical', 'horizontal'}, default: 'vertical'
3976
- If 'horizontal', plots the boxes horizontally.
3977
- Otherwise, plots the boxes vertically.
3978
-
3979
- .. versionadded:: 3.10
3980
-
3981
3982
Returns
3982
3983
-------
3983
3984
dict
@@ -4164,12 +4165,12 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
4164
4165
4165
4166
@_api .make_keyword_only ("3.9" , "widths" )
4166
4167
def bxp (self , bxpstats , positions = None , widths = None , vert = None ,
4167
- patch_artist = False , shownotches = False , showmeans = False ,
4168
- showcaps = True , showbox = True , showfliers = True ,
4168
+ orientation = None , patch_artist = False , shownotches = False ,
4169
+ showmeans = False , showcaps = True , showbox = True , showfliers = True ,
4169
4170
boxprops = None , whiskerprops = None , flierprops = None ,
4170
4171
medianprops = None , capprops = None , meanprops = None ,
4171
4172
meanline = False , manage_ticks = True , zorder = None ,
4172
- capwidths = None , label = None , orientation = None ):
4173
+ capwidths = None , label = None ):
4173
4174
"""
4174
4175
Draw a box and whisker plot from pre-computed statistics.
4175
4176
@@ -4234,6 +4235,12 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=None,
4234
4235
If True, plots the boxes vertically.
4235
4236
If False, plots the boxes horizontally.
4236
4237
4238
+ orientation : {'vertical', 'horizontal'}, default: 'vertical'
4239
+ If 'horizontal', plots the boxes horizontally.
4240
+ Otherwise, plots the boxes vertically.
4241
+
4242
+ .. versionadded:: 3.10
4243
+
4237
4244
patch_artist : bool, default: False
4238
4245
If `False` produces boxes with the `.Line2D` artist.
4239
4246
If `True` produces boxes with the `~matplotlib.patches.Patch` artist.
@@ -4275,12 +4282,6 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=None,
4275
4282
zorder : float, default: ``Line2D.zorder = 2``
4276
4283
The zorder of the resulting boxplot.
4277
4284
4278
- orientation : {'vertical', 'horizontal'}, default: 'vertical'
4279
- If 'horizontal', plots the boxes horizontally.
4280
- Otherwise, plots the boxes vertically.
4281
-
4282
- .. versionadded:: 3.10
4283
-
4284
4285
Returns
4285
4286
-------
4286
4287
dict
@@ -4357,23 +4358,17 @@ def merge_kw_rc(subkey, explicit, zdelta=0, usemarker=True):
4357
4358
if meanprops is None or removed_prop not in meanprops :
4358
4359
mean_kw [removed_prop ] = ''
4359
4360
4361
+ # vert and orientation parameters are linked until vert's
4362
+ # deprecation period expires. If both are selected,
4363
+ # vert takes precedence.
4360
4364
if vert is not None :
4361
4365
_api .warn_deprecated (
4362
4366
"3.10" ,
4363
4367
name = "vert: bool" ,
4364
4368
alternative = "orientation: {'vertical', 'horizontal'}"
4365
- )
4366
-
4367
- # vert and orientation parameters are linked until vert's
4368
- # deprecation period expires. If both are selected,
4369
- # vert takes precedence.
4370
- if vert or vert is None and orientation is None :
4371
- orientation = 'vertical'
4372
- elif vert is False :
4373
- orientation = 'horizontal'
4374
-
4375
- if orientation is not None :
4376
- _api .check_in_list (['horizontal' , 'vertical' ], orientation = orientation )
4369
+ )
4370
+ orientation = 'vertical' if vert else 'horizontal'
4371
+ _api .check_in_list (['horizontal' , 'vertical' ], orientation = orientation )
4377
4372
4378
4373
# vertical or horizontal plot?
4379
4374
maybe_swap = slice (None ) if orientation == 'vertical' else slice (None , None , - 1 )
0 commit comments