@@ -3057,9 +3057,9 @@ def grouped_bar(self, heights, *, positions=None, group_spacing=1.5, bar_spacing
30573057
30583058 .. code-block:: python
30593059
3060- grouped_bar([dataset_1, dataset_2, dataset_3 ],
3060+ grouped_bar([dataset_0, dataset_1, dataset_2 ],
30613061 tick_labels=['A', 'B'],
3062- labels=['dataset 1 ', 'dataset 2 ', 'dataset 3 '])
3062+ labels=['dataset 0 ', 'dataset 1 ', 'dataset 2 '])
30633063
30643064 .. plot:: _embedded_plots/grouped_bar.py
30653065
@@ -3156,13 +3156,13 @@ def grouped_bar(self, heights, *, positions=None, group_spacing=1.5, bar_spacing
31563156 These will show up in the legend.
31573157
31583158 group_spacing : float, default: 1.5
3159- The space between two bar groups as multiples of bar width.
3159+ The space between two bar groups as a multiple of bar width.
31603160
31613161 The default value of 1.5 thus means that there's a gap of
31623162 1.5 bar widths between bar groups.
31633163
31643164 bar_spacing : float, default: 0
3165- The space between bars as multiples of bar width.
3165+ The space between bars as a multiple of bar width.
31663166
31673167 orientation : {"vertical", "horizontal"}, default: "vertical"
31683168 The direction of the bars.
@@ -3181,17 +3181,17 @@ def grouped_bar(self, heights, *, positions=None, group_spacing=1.5, bar_spacing
31813181
31823182 Returns
31833183 -------
3184- _GroupedBarReturn
3184+ _GroupedBarReturn
31853185
3186- A provisional result object. This will be refined in the future.
3187- For now, the guaranteed API on the returned object is limited to
3186+ A provisional result object. This will be refined in the future.
3187+ For now, the guaranteed API on the returned object is limited to
31883188
3189- - the attribute ``bar_containers``, which is a list of
3190- `.BarContainer`, i.e. the results of the individual `~.Axes.bar`
3191- calls for each dataset.
3189+ - the attribute ``bar_containers``, which is a list of
3190+ `.BarContainer`, i.e. the results of the individual `~.Axes.bar`
3191+ calls for each dataset.
31923192
3193- - a ``remove()`` method, that remove all bars from the Axes.
3194- See also `.Artist.remove()`.
3193+ - a ``remove()`` method, that remove all bars from the Axes.
3194+ See also `.Artist.remove()`.
31953195
31963196 See Also
31973197 --------
@@ -3261,8 +3261,7 @@ def grouped_bar(self, heights, *, positions=None, group_spacing=1.5, bar_spacing
32613261 heights = heights .to_numpy ().T
32623262 elif hasattr (heights , 'keys' ): # dict
32633263 if labels is not None :
3264- raise ValueError (
3265- "'labels' cannot be used if 'heights' are a mapping" )
3264+ raise ValueError ("'labels' cannot be used if 'heights' is a mapping" )
32663265 labels = heights .keys ()
32673266 heights = list (heights .values ())
32683267 elif hasattr (heights , 'shape' ): # numpy array
@@ -3317,8 +3316,7 @@ def grouped_bar(self, heights, *, positions=None, group_spacing=1.5, bar_spacing
33173316 # place the bars, but only use numerical positions, categorical tick labels
33183317 # are handled separately below
33193318 bar_containers = []
3320- for i , (hs , label , color ) in enumerate (
3321- zip (heights , labels , colors )):
3319+ for i , (hs , label , color ) in enumerate (zip (heights , labels , colors )):
33223320 lefts = (group_centers - 0.5 * group_distance + margin_abs
33233321 + i * (bar_width + bar_spacing_abs ))
33243322 if orientation == "vertical" :
0 commit comments