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

Skip to content

Commit 707bf60

Browse files
committed
Make dict access safer
1 parent c929b33 commit 707bf60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def _makefill(self, x, y, kw, kwargs):
265265
# Might be problematic with fallback names such as
266266
# 'facecolor' and such. Possibly fixed by traitlets?
267267
self._setdefaults(kw, kwargs)
268-
facecolor = kw['color']
268+
facecolor = kw.get('color', None)
269269
seg = mpatches.Polygon(np.hstack((x[:, np.newaxis],
270270
y[:, np.newaxis])),
271271
facecolor=facecolor,

0 commit comments

Comments
 (0)