Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update lib/matplotlib/axes/_axes.py
Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>
  • Loading branch information
timhoffm and rcomer authored Jan 24, 2025
commit a61e5922f25f0ad94b369ed15b8e17d81036b05d
4 changes: 2 additions & 2 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2714,9 +2714,9 @@ def barh(self, y, width, height=0.8, left=None, *, align="center",

Bars are often used for categorical data, i.e. string labels below
the bars. You can provide a list of strings directly to *y*.
``bar(['A', 'B', 'C'], [1, 2, 3])`` is often a shorter and more
``barh(['A', 'B', 'C'], [1, 2, 3])`` is often a shorter and more
convenient notation compared to
``bar(range(3), [1, 2, 3], tick_label=['A', 'B', 'C'])``. They are
``barh(range(3), [1, 2, 3], tick_label=['A', 'B', 'C'])``. They are
equivalent as long as the names are unique. The explicit *tick_label*
notation draws the names in the sequence given. However, when having
duplicate values in categorical *y* data, these values map to the same
Expand Down