Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 372f296

Browse files
authored
Added default value of align to bar an barh
Make the change of the default value of align in bar and barh more obvious by explicitly documenting it.
1 parent eb6e422 commit 372f296

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,7 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
18931893
dictionary of kwargs to be passed to errorbar method. *ecolor* and
18941894
*capsize* may be specified here rather than as independent kwargs.
18951895
1896-
align : {'center', 'edge'}, optional
1896+
align : {'center', 'edge'}, optional, default: 'center'
18971897
If 'edge', aligns bars by their left edges (for vertical bars) and
18981898
by their bottom edges (for horizontal bars). If 'center', interpret
18991899
the `left` argument as the coordinates of the centers of the bars.
@@ -2216,7 +2216,7 @@ def barh(self, bottom, width, height=0.8, left=None, **kwargs):
22162216
dictionary of kwargs to be passed to errorbar method. `ecolor` and
22172217
`capsize` may be specified here rather than as independent kwargs.
22182218
2219-
align : {'center', 'edge'}, optional
2219+
align : {'center', 'edge'}, optional, default: 'center'
22202220
If 'edge', aligns bars by their left edges (for vertical
22212221
bars) and by their bottom edges (for horizontal bars). If
22222222
'center', interpret the `bottom` argument as the

0 commit comments

Comments
 (0)