Closed
Description
According to the plt.Line2D
docs, you should be able to use a tuple like (<offset>, (<on>, <off>))
as a linestyle, and indeed the following works
import matplotlib.pyplot as plt
fig,ax = plt.subplots()
ax.plot([0,1],linestyle='-')
ax.plot([1,2],linestyle=(0,(3,1)))
plt.show()
However, if I try to use the same in a cycler
, it doesn't work. For example with the following:
import matplotlib.pyplot as plt
from cycler import cycler
pc = cycler('linestyle', ['-', (0,(3,1))] )
fig,ax = plt.subplots()
ax.set_prop_cycle(pc)
ax.plot([0,1])
ax.plot([1,2])
plt.show()
I get the error AttributeError: 'Line2D' object has no attribute '_dashSeq'
.
Is this not intended to work in the first place, or is there something wrong somewhere?
System: miniconda3
, recently updated, on Kubuntu 14.04.
(Note: I posted this first as a question on StackOverflow.)