In the docs for Line2D, it says that the linestyle can be "any drawstyle 
in combination with a linestyle, e.g. 'steps--'."  However, this doesn't 
seem to work in practice.  I believe I have matplotlib 1.0.1 here:

In [2]: from matplotlib import lines

In [3]: line=lines.Line2D([0,1,2],[0,1,4], linestyle='steps--')

In [4]: line.get_drawstyle()
Out[4]: 'default'

In [5]: line.get_linestyle()
Out[5]: '--'


Note that if I specifically set the linestyle using set_linestyle, it 
appears to parse out the drawstyle:

In [11]: line.set_linestyle('steps--')

In [12]: line.get_drawstyle()
Out[12]: 'steps'


However, if I plot the line using the plot() command, the drawstyle is 
correctly set to 'steps'.


In [6]: from matplotlib import pyplot

In [7]: line2=pyplot.plot([0,1,2],[0,1,4], linestyle='steps--')

In [8]: line2
Out[8]: [<matplotlib.lines.Line2D object at 0x114fcb110>]

In [9]: line2[0].get_drawstyle()
Out[9]: 'steps'

In [10]: line2[0].get_linestyle()
Out[10]: '--'

Should Line2D parse out the drawstyle from the linestyle, or are the 
docs wrong about the Line2D linestyle parameters, or am I just 
misunderstanding something here?

Thanks,

Jason

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to