bar with zero data

Hello!
I see strange behaviour in plotting bars with dates on x-axis. Example attached, problem seems to arise only after duplicating x-axis and with all-zero data. good.png is with non-zero data and bad.png with zero data.

Regards,
Andres

bad.png

good.png

test1.py (648 Bytes)

I noticed some issues recently with another bug report regarding bar charts. It seems that if the first bar (maybe even the last bar) is of zero height, then some code somewhere doesn’t properly choose the correct axes limit. This error here might be a degenerate form of that bug.

If anything, this indicates that the bug must be somewhere between the auto tickers and bar(). I have checked bar() itself, and I don’t see any sort of problem. There was a possible issue at around line 4694 in axes.py (at the end of the bar() method), but I don’t think that is the cause.

Ben Root

···

On Mon, Nov 22, 2010 at 7:56 AM, andres luhamaa <andresluhamaa@…287…> wrote:

Hello!

I see strange behaviour in plotting bars with dates on x-axis. Example attached, problem seems to arise only after duplicating x-axis and with all-zero data. good.png is with non-zero data and bad.png with zero data.

Regards,

Andres