Closed
Description
Bug report
axes.errorbar rises an exception when called after markerfacecolor is included in property_cycle.
Bug summary
Apparently mfc kwarg is passed on to vline property update method, which doesn't expect it.
import matplotlib.pyplot as plt
plt.rc("axes", prop_cycle = 'cycler(mfc=["k","w"])')
plt.errorbar([1,3,2],[2,3,1],yerr=1)
Actual outcome
AttributeError Traceback (most recent call last)
<ipython-input-43-94eadd48f4c3> in <module>()
1 plt.rc("axes", prop_cycle = 'cycler(mfc=["k","w"])')
----> 2 plt.errorbar([1,3,2],[2,3,1],yerr=1)
C:\WinPython362\python-3.6.2rc2.amd64\lib\site-packages\matplotlib\pyplot.py in errorbar(x, y, yerr, xerr, fmt, ecolor, elinewidth, capsize, barsabove, lolims, uplims, xlolims, xuplims, errorevery, capthick, hold, data, **kwargs)
2850 xlolims=xlolims, xuplims=xuplims,
2851 errorevery=errorevery, capthick=capthick, data=data,
-> 2852 **kwargs)
2853 finally:
2854 ax._hold = washold
C:\WinPython362\python-3.6.2rc2.amd64\lib\site-packages\matplotlib\__init__.py in inner(ax, *args, **kwargs)
1708 warnings.warn(msg % (label_namer, func.__name__),
1709 RuntimeWarning, stacklevel=2)
-> 1710 return func(ax, *args, **kwargs)
1711 pre_doc = inner.__doc__
1712 if pre_doc is None:
C:\WinPython362\python-3.6.2rc2.amd64\lib\site-packages\matplotlib\axes\_axes.py in errorbar(self, x, y, yerr, xerr, fmt, ecolor, elinewidth, capsize, barsabove, lolims, uplims, xlolims, xuplims, errorevery, capthick, **kwargs)
3089 xo, _ = xywhere(x, lower, noylims & everymask)
3090 lo, uo = xywhere(lower, upper, noylims & everymask)
-> 3091 barcols.append(self.vlines(xo, lo, uo, **eb_lines_style))
3092 if capsize > 0:
3093 caplines.append(mlines.Line2D(xo, lo, marker='_',
C:\WinPython362\python-3.6.2rc2.amd64\lib\site-packages\matplotlib\__init__.py in inner(ax, *args, **kwargs)
1708 warnings.warn(msg % (label_namer, func.__name__),
1709 RuntimeWarning, stacklevel=2)
-> 1710 return func(ax, *args, **kwargs)
1711 pre_doc = inner.__doc__
1712 if pre_doc is None:
C:\WinPython362\python-3.6.2rc2.amd64\lib\site-packages\matplotlib\axes\_axes.py in vlines(self, x, ymin, ymax, colors, linestyles, label, **kwargs)
1062 linestyles=linestyles, label=label)
1063 self.add_collection(lines, autolim=False)
-> 1064 lines.update(kwargs)
1065
1066 if len(x) > 0:
C:\WinPython362\python-3.6.2rc2.amd64\lib\site-packages\matplotlib\artist.py in update(self, props)
845 try:
846 ret = [_update_property(self, k, v)
--> 847 for k, v in props.items()]
848 finally:
849 self.eventson = store
C:\WinPython362\python-3.6.2rc2.amd64\lib\site-packages\matplotlib\artist.py in <listcomp>(.0)
845 try:
846 ret = [_update_property(self, k, v)
--> 847 for k, v in props.items()]
848 finally:
849 self.eventson = store
C:\WinPython362\python-3.6.2rc2.amd64\lib\site-packages\matplotlib\artist.py in _update_property(self, k, v)
838 func = getattr(self, 'set_' + k, None)
839 if not callable(func):
--> 840 raise AttributeError('Unknown property %s' % k)
841 return func(v)
842
AttributeError: Unknown property markerfacecolor
Expected outcome
Matplotlib version
Matplotlib 2.1.0
Windows 10
Python 3.6.2
jupyter inline or tk
WinPython
Metadata
Metadata
Assignees
Labels
No labels