Skip to content

Commit 5e55680

Browse files
committed
MNT: add kwarg normalization to ax.bar
1 parent 5a7dab7 commit 5e55680

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,6 +1980,7 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
19801980
19811981
.. plot:: mpl_examples/pylab_examples/bar_stacked.py
19821982
"""
1983+
kwargs = cbook.normalize_kwargs(kwargs, mpatches._patch_alias_map)
19831984
if not self._hold:
19841985
self.cla()
19851986
color = kwargs.pop('color', None)

lib/matplotlib/patches.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@
5555
5656
""")
5757

58+
_patch_alias_map = {
59+
'antialiased': ['aa'],
60+
'edgecolor': ['ec'],
61+
'facecolor': ['fc'],
62+
'linewidth': ['lw'],
63+
'linestyle': ['ls']
64+
}
65+
5866

5967
class Patch(artist.Artist):
6068
"""

0 commit comments

Comments
 (0)