You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import matplotlib.pyplot as plt
ls = (0,(2,2))
plt.plot()
line = plt.axvline(1,linestyle=ls)
however:
line.set_linestyle(ls)
produces the expected result. both axhline and axvline are affected, axhspan and axvspan not.
matplotlib '1.5.1' installed through Anaconda on Ubuntu 15.10.
Traceback:
Traceback (most recent call last):
File "/home/georg/python/linestyle_bug.py", line 13, in <module>
line = plt.axhline(0,1,linestyle=ls)
File "/home/georg/anaconda2/lib/python2.7/site-packages/matplotlib/pyplot.py", line 2574, in axhline
ret = ax.axhline(y=y, xmin=xmin, xmax=xmax, **kwargs)
File "/home/georg/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 749, in axhline
l = mlines.Line2D([xmin, xmax], [y, y], transform=trans, **kwargs)
File "/home/georg/anaconda2/lib/python2.7/site-packages/matplotlib/lines.py", line 332, in __init__
self.set_linestyle(linestyle)
File "/home/georg/anaconda2/lib/python2.7/site-packages/matplotlib/lines.py", line 1029, in set_linestyle
self.set_dashes(ls[1])
File "/home/georg/anaconda2/lib/python2.7/site-packages/matplotlib/lines.py", line 1165, in set_dashes
if self._dashSeq != seq:
AttributeError: 'Line2D' object has no attribute '_dashSeq'
The text was updated successfully, but these errors were encountered:
the following does not work:
however:
produces the expected result. both
axhline
andaxvline
are affected,axhspan
andaxvspan
not.matplotlib '1.5.1' installed through Anaconda on Ubuntu 15.10.
Traceback:
The text was updated successfully, but these errors were encountered: