@@ -3062,116 +3062,115 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3062
3062
3063
3063
Parameters
3064
3064
----------
3065
+ x : Array or a sequence of vectors.
3066
+ The input data.
3067
+
3068
+ notch : bool, default = False
3069
+ If False, produces a rectangular box plot.
3070
+ If True, will produce a notched box plot
3071
+
3072
+ sym : str or None, default = None
3073
+ The default symbol for flier points.
3074
+ Enter an empty string ('') if you don't want to show fliers.
3075
+ If `None`, then the fliers default to 'b+' If you want more
3076
+ control use the flierprops kwarg.
3077
+
3078
+ vert : bool, default = True
3079
+ If True (default), makes the boxes vertical.
3080
+ If False, makes horizontal boxes.
3081
+
3082
+ whis : float, sequence (default = 1.5) or string
3083
+ As a float, determines the reach of the whiskers past the first
3084
+ and third quartiles (e.g., Q3 + whis*IQR, IQR = interquartile
3085
+ range, Q3-Q1). Beyond the whiskers, data are considered outliers
3086
+ and are plotted as individual points. Set this to an unreasonably
3087
+ high value to force the whiskers to show the min and max values.
3088
+ Alternatively, set this to an ascending sequence of percentile
3089
+ (e.g., [5, 95]) to set the whiskers at specific percentiles of
3090
+ the data. Finally, *whis* can be the string 'range' to force the
3091
+ whiskers to the min and max of the data. In the edge case that
3092
+ the 25th and 75th percentiles are equivalent, *whis* will be
3093
+ automatically set to 'range'.
3094
+
3095
+ bootstrap : None (default) or integer
3096
+ Specifies whether to bootstrap the confidence intervals
3097
+ around the median for notched boxplots. If bootstrap==None,
3098
+ no bootstrapping is performed, and notches are calculated
3099
+ using a Gaussian-based asymptotic approximation (see McGill, R.,
3100
+ Tukey, J.W., and Larsen, W.A., 1978, and Kendall and Stuart,
3101
+ 1967). Otherwise, bootstrap specifies the number of times to
3102
+ bootstrap the median to determine it's 95% confidence intervals.
3103
+ Values between 1000 and 10000 are recommended.
3104
+
3105
+ usermedians : array-like or None (default)
3106
+ An array or sequence whose first dimension (or length) is
3107
+ compatible with *x*. This overrides the medians computed by
3108
+ matplotlib for each element of *usermedians* that is not None.
3109
+ When an element of *usermedians* == None, the median will be
3110
+ computed by matplotlib as normal.
3111
+
3112
+ conf_intervals : array-like or None (default)
3113
+ Array or sequence whose first dimension (or length) is compatible
3114
+ with *x* and whose second dimension is 2. When the current element
3115
+ of *conf_intervals* is not None, the notch locations computed by
3116
+ matplotlib are overridden (assuming notch is True). When an
3117
+ element of *conf_intervals* is None, boxplot compute notches the
3118
+ method specified by the other kwargs (e.g., *bootstrap*).
3065
3119
3066
- x : Array or a sequence of vectors.
3067
- The input data.
3068
-
3069
- notch : bool, default = False
3070
- If False, produces a rectangular box plot.
3071
- If True, will produce a notched box plot
3072
-
3073
- sym : str or None, default = None
3074
- The default symbol for flier points.
3075
- Enter an empty string ('') if you don't want to show fliers.
3076
- If `None`, then the fliers default to 'b+' If you want more
3077
- control use the flierprops kwarg.
3078
-
3079
- vert : bool, default = True
3080
- If True (default), makes the boxes vertical.
3081
- If False, makes horizontal boxes.
3082
-
3083
- whis : float, sequence (default = 1.5) or string
3084
- As a float, determines the reach of the whiskers past the first
3085
- and third quartiles (e.g., Q3 + whis*IQR, IQR = interquartile
3086
- range, Q3-Q1). Beyond the whiskers, data are considered outliers
3087
- and are plotted as individual points. Set this to an unreasonably
3088
- high value to force the whiskers to show the min and max values.
3089
- Alternatively, set this to an ascending sequence of percentile
3090
- (e.g., [5, 95]) to set the whiskers at specific percentiles of
3091
- the data. Finally, *whis* can be the string 'range' to force the
3092
- whiskers to the min and max of the data. In the edge case that
3093
- the 25th and 75th percentiles are equivalent, *whis* will be
3094
- automatically set to 'range'.
3095
-
3096
- bootstrap : None (default) or integer
3097
- Specifies whether to bootstrap the confidence intervals
3098
- around the median for notched boxplots. If bootstrap==None,
3099
- no bootstrapping is performed, and notches are calculated
3100
- using a Gaussian-based asymptotic approximation (see McGill, R.,
3101
- Tukey, J.W., and Larsen, W.A., 1978, and Kendall and Stuart,
3102
- 1967). Otherwise, bootstrap specifies the number of times to
3103
- bootstrap the median to determine it's 95% confidence intervals.
3104
- Values between 1000 and 10000 are recommended.
3105
-
3106
- usermedians : array-like or None (default)
3107
- An array or sequence whose first dimension (or length) is
3108
- compatible with *x*. This overrides the medians computed by
3109
- matplotlib for each element of *usermedians* that is not None.
3110
- When an element of *usermedians* == None, the median will be
3111
- computed by matplotlib as normal.
3112
-
3113
- conf_intervals : array-like or None (default)
3114
- Array or sequence whose first dimension (or length) is compatible
3115
- with *x* and whose second dimension is 2. When the current element
3116
- of *conf_intervals* is not None, the notch locations computed by
3117
- matplotlib are overridden (assuming notch is True). When an
3118
- element of *conf_intervals* is None, boxplot compute notches the
3119
- method specified by the other kwargs (e.g., *bootstrap*).
3120
-
3121
- positions : array-like, default = [1, 2, ..., n]
3122
- Sets the positions of the boxes. The ticks and limits
3123
- are automatically set to match the positions.
3124
-
3125
- widths : array-like, default = 0.5
3126
- Either a scalar or a vector and sets the width of each box. The
3127
- default is 0.5, or ``0.15*(distance between extreme positions)``
3128
- if that is smaller.
3129
-
3130
- labels : sequence or None (default)
3131
- Labels for each dataset. Length must be compatible with
3132
- dimensions of *x*
3133
-
3134
- patch_artist : bool, default = False
3135
- If False produces boxes with the Line2D artist
3136
- If True produces boxes with the Patch artist
3137
-
3138
- showmeans : bool, default = False
3139
- If True, will toggle one the rendering of the means
3140
-
3141
- showcaps : bool, default = True
3142
- If True, will toggle one the rendering of the caps
3143
-
3144
- showbox : bool, default = True
3145
- If True, will toggle one the rendering of box
3146
-
3147
- showfliers : bool, default = True
3148
- If True, will toggle one the rendering of the fliers
3149
-
3150
- boxprops : dict or None (default)
3151
- If provided, will set the plotting style of the boxes
3152
-
3153
- whiskerprops : dict or None (default)
3154
- If provided, will set the plotting style of the whiskers
3155
-
3156
- capprops : dict or None (default)
3157
- If provided, will set the plotting style of the caps
3158
-
3159
- flierprops : dict or None (default)
3160
- If provided, will set the plotting style of the fliers
3161
-
3162
- medianprops : dict or None (default)
3163
- If provided, will set the plotting style of the medians
3164
-
3165
- meanprops : dict or None (default)
3120
+ positions : array-like, default = [1, 2, ..., n]
3121
+ Sets the positions of the boxes. The ticks and limits
3122
+ are automatically set to match the positions.
3123
+
3124
+ widths : array-like, default = 0.5
3125
+ Either a scalar or a vector and sets the width of each box. The
3126
+ default is 0.5, or ``0.15*(distance between extreme positions)``
3127
+ if that is smaller.
3128
+
3129
+ labels : sequence or None (default)
3130
+ Labels for each dataset. Length must be compatible with
3131
+ dimensions of *x*
3132
+
3133
+ patch_artist : bool, default = False
3134
+ If False produces boxes with the Line2D artist
3135
+ If True produces boxes with the Patch artist
3136
+
3137
+ showmeans : bool, default = False
3138
+ If True, will toggle one the rendering of the means
3139
+
3140
+ showcaps : bool, default = True
3141
+ If True, will toggle one the rendering of the caps
3142
+
3143
+ showbox : bool, default = True
3144
+ If True, will toggle one the rendering of box
3145
+
3146
+ showfliers : bool, default = True
3147
+ If True, will toggle one the rendering of the fliers
3148
+
3149
+ boxprops : dict or None (default)
3150
+ If provided, will set the plotting style of the boxes
3151
+
3152
+ whiskerprops : dict or None (default)
3153
+ If provided, will set the plotting style of the whiskers
3154
+
3155
+ capprops : dict or None (default)
3156
+ If provided, will set the plotting style of the caps
3157
+
3158
+ flierprops : dict or None (default)
3159
+ If provided, will set the plotting style of the fliers
3160
+
3161
+ medianprops : dict or None (default)
3162
+ If provided, will set the plotting style of the medians
3163
+
3164
+ meanprops : dict or None (default)
3166
3165
If provided, will set the plotting style of the means
3167
3166
3168
- meanline : bool, default = False
3167
+ meanline : bool, default = False
3169
3168
If True (and *showmeans* is True), will try to render the mean
3170
3169
as a line spanning the full width of the box according to
3171
3170
*meanprops*. Not recommended if *shownotches* is also True.
3172
3171
Otherwise, means will be shown as points.
3173
3172
3174
- manage_xticks : bool, default = True
3173
+ manage_xticks : bool, default = True
3175
3174
If the function should adjust the xlim and xtick locations.
3176
3175
3177
3176
Returns
@@ -4977,7 +4976,7 @@ def _pcolorargs(funcname, *args, **kw):
4977
4976
allmatch = kw .pop ("allmatch" , False )
4978
4977
4979
4978
if len (args ) == 1 :
4980
- C = args [0 ]
4979
+ C = np . asanyarray ( args [0 ])
4981
4980
numRows , numCols = C .shape
4982
4981
if allmatch :
4983
4982
X , Y = np .meshgrid (np .arange (numCols ), np .arange (numRows ))
@@ -4987,7 +4986,7 @@ def _pcolorargs(funcname, *args, **kw):
4987
4986
return X , Y , C
4988
4987
4989
4988
if len (args ) == 3 :
4990
- X , Y , C = args
4989
+ X , Y , C = [ np . asanyarray ( a ) for a in args ]
4991
4990
numRows , numCols = C .shape
4992
4991
else :
4993
4992
raise TypeError (
0 commit comments