@@ -2386,6 +2386,17 @@ def bar(self, x, height, width=0.8, bottom=None, *, align="center",
23862386 The x coordinates of the bars. See also *align* for the
23872387 alignment of the bars to the coordinates.
23882388
2389+ Bars are often used for categorical data, i.e. string labels below
2390+ the bars. You can provide a list of strings directly to *x*.
2391+ ``bar(['A', 'B', 'C'], [1, 2, 3])`` is often a shorter and more
2392+ convenient notation compared to
2393+ ``bar(range(3), [1, 2, 3], tick_label=['A', 'B', 'C'])``. They are
2394+ equivalent as long as the names are unique. The explicit *tick_label*
2395+ notation draws the names in the sequence given. However, when having
2396+ duplicate values in categorical *x* data, these values map to the same
2397+ numerical x coordinate, and hence the corresponding bars are drawn on
2398+ top of each other.
2399+
23892400 height : float or array-like
23902401 The height(s) of the bars.
23912402
@@ -2701,6 +2712,17 @@ def barh(self, y, width, height=0.8, left=None, *, align="center",
27012712 The y coordinates of the bars. See also *align* for the
27022713 alignment of the bars to the coordinates.
27032714
2715+ Bars are often used for categorical data, i.e. string labels below
2716+ the bars. You can provide a list of strings directly to *y*.
2717+ ``bar(['A', 'B', 'C'], [1, 2, 3])`` is often a shorter and more
2718+ convenient notation compared to
2719+ ``bar(range(3), [1, 2, 3], tick_label=['A', 'B', 'C'])``. They are
2720+ equivalent as long as the names are unique. The explicit *tick_label*
2721+ notation draws the names in the sequence given. However, when having
2722+ duplicate values in categorical *y* data, these values map to the same
2723+ numerical y coordinate, and hence the corresponding bars are drawn on
2724+ top of each other.
2725+
27042726 width : float or array-like
27052727 The width(s) of the bars.
27062728
0 commit comments