Dashed line step plot

Hello,

Can someone confirm me if this creates a dashed line for a simple step plot?

this is fine

plt.plot(range(10), “g–”)

plots solid line!

plt.step(range(10), “g–”)

Thanks,

···


Gökhan

I get a solid line for plt.step like you do.

MPL 1.0.0, SVN revision 8657.

-Jeff

···

On Sep 17, 2010, at 4:34 PM, Gökhan Sever wrote:

Hello,

Can someone confirm me if this creates a dashed line for a simple step plot?

# this is fine
plt.plot(range(10), "g--")

# plots solid line!
plt.step(range(10), "g--")

Thanks,

--
Gökhan
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Same here.
-paul h.

···

On Fri, Sep 17, 2010 at 2:21 PM, Jeffrey Blackburne <jblackburne@...287...> wrote:

I get a solid line for plt.step like you do.

MPL 1.0.0, SVN revision 8657.

-Jeff

On Sep 17, 2010, at 4:34 PM, Gökhan Sever wrote:

Hello,

Can someone confirm me if this creates a dashed line for a simple step plot?

# this is fine
plt.plot(range(10), "g--")

# plots solid line!
plt.step(range(10), "g--")

Thanks,

--
Gökhan
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

My version is v8624. Looks like a bug to me.

···

On Fri, Sep 17, 2010 at 3:34 PM, Gökhan Sever <gokhansever@…287…> wrote:

Hello,

Can someone confirm me if this creates a dashed line for a simple step plot?

this is fine

plt.plot(range(10), “g–”)

plots solid line!

plt.step(range(10), “g–”)

Thanks,


Gökhan

Not a bug, but a “feature”. In step(), the ‘linestyle’ kwarg gets over-ridden with a value of ‘steps-’ + kwargs[‘where’].

Ben Root

···

On Fri, Sep 17, 2010 at 8:43 PM, Gökhan Sever <gokhansever@…287…> wrote:

On Fri, Sep 17, 2010 at 3:34 PM, Gökhan Sever <gokhansever@…287…> wrote:

Hello,

Can someone confirm me if this creates a dashed line for a simple step plot?

this is fine

plt.plot(range(10), “g–”)

plots solid line!

plt.step(range(10), “g–”)

Thanks,


Gökhan

My version is v8624. Looks like a bug to me.

Hard to interpret that way at the first look. This does what I want:

plt.plot(range(10), ‘g–’, drawstyle=‘steps-mid’)

···

On Fri, Sep 17, 2010 at 8:59 PM, Benjamin Root <ben.root@…3146…4…> wrote:

Not a bug, but a “feature”. In step(), the ‘linestyle’ kwarg gets over-ridden with a value of ‘steps-’ + kwargs[‘where’].

Ben Root


Gökhan

I’ll admit that I am not very familiar with how these step plots are done. Maybe it should be the ‘drawstyle’ kwarg that should be over-riden, not ‘linestyle’?

Ben Root

···

On Sat, Sep 18, 2010 at 10:39 AM, Gökhan Sever <gokhansever@…287…> wrote:

On Fri, Sep 17, 2010 at 8:59 PM, Benjamin Root <ben.root@…1304…> wrote:

Not a bug, but a “feature”. In step(), the ‘linestyle’ kwarg gets over-ridden with a value of ‘steps-’ + kwargs[‘where’].

Ben Root

Hard to interpret that way at the first look. This does what I want:

plt.plot(range(10), ‘g–’, drawstyle=‘steps-mid’)

This seems like more reasonable to me. When I update /matplotlib/lib/axes.py:

kwargs[‘linestyle’] = ‘steps-’ + where → kwargs[‘drawstyle’] = ‘steps-’ + where

then I get the expected behavior.

···

On Sat, Sep 18, 2010 at 1:03 PM, Benjamin Root <ben.root@…1304…> wrote:

I’ll admit that I am not very familiar with how these step plots are done. Maybe it should be the ‘drawstyle’ kwarg that should be over-riden, not ‘linestyle’?

Ben Root


Gökhan