axes.hold: False causes unexpected behaviour

Hello, just thought I should report two unexpected behaviours, which took me a while to pinpoint:

1) errorbar() plots the points but not the errorbars if axes.hold==False for those axes (in my case, due to it being set to False in rcParams)

2) when axes.hold is False, (again either set locally for the current axes, or globally in rcParams), setting logscale _before_ calling bar() raises a ValueError:

ValueError: Cannot set nonpositive limits with log transform

Setting it to logscale _after_ calling bar() prevents the error. Setting axes.hold to True prevents the error in either case, even when setting logscale _before_ calling bar(). I fear this behaviour may be related to the couple of lines dealing with "holdstate" I submitted as part of a patch last year to axes.bar

I think I may just set axes.hold back to the default True in my rcParams, since it seems that's what most people use and test with. But, it might be worthwhile to sort out any unintended behaviours when a user decides to set their rcParams['axes.hold']=False.

Cheers,

Martin

I forgot to mention, I'm running 0.87.7 in windows with WxAgg.

Martin

Martin Spacek wrote:

ยทยทยท

Hello, just thought I should report two unexpected behaviours, which took me a while to pinpoint:

1) errorbar() plots the points but not the errorbars if axes.hold==False for those axes (in my case, due to it being set to False in rcParams)

2) when axes.hold is False, (again either set locally for the current axes, or globally in rcParams), setting logscale _before_ calling bar() raises a ValueError:

ValueError: Cannot set nonpositive limits with log transform

Setting it to logscale _after_ calling bar() prevents the error. Setting axes.hold to True prevents the error in either case, even when setting logscale _before_ calling bar(). I fear this behaviour may be related to the couple of lines dealing with "holdstate" I submitted as part of a patch last year to axes.bar

I think I may just set axes.hold back to the default True in my rcParams, since it seems that's what most people use and test with. But, it might be worthwhile to sort out any unintended behaviours when a user decides to set their rcParams['axes.hold']=False.

Cheers,

Martin