Handle the edge case in matplotlib.axes.vlines and matplotlib.axes.hlines where an empty list or array is passed in as x (or y). Previously, the vlines/hlines routines would raise an exception when min() was called, if x (or y) was an empty list.
Handle the edge case in matplotlib.axes.vlines, where an empty list o…
…r array is passed in as x. Previously,
the vlines routine would raise an exception when min(x) was called, if x was an empty list.wq
I presume the same should be done for hlines() as well?
Congrats on getting the 1000th issue, btw.
Re: for hlines...yes...I presume so. I forgot that matplotlib supported hlines :/
I'll check it and perform the same change there for this pull request.
Handled edge case for hlines also; if y is an empty list or zero-leng…
…th array, the routine
would raise an exception.
oops; failed to commit after fixing this little bugaboo; should have …
…been len(y) instead of len(x)
Fix added for hlines as well.
Thanks for that. My only other concern is what happens if the length of the input array is one. I am pretty sure update_datalim() is smart about this, but I can't remember off the top of my head.
Re: 1000th issue: Is there a door prize? ;)
Re: update_datalim(): Just in the last few days, I have had a plot or two that had a single point with error bars. The autoscaling seemed to work fine, so I think update_datalim() is OK with just one point.
Re: door prize: Yeah, you get a free PR merge. Congrats!
Merge pull request #1000 from dhyams/fix_vlines
Fix traceback for vlines/hlines, when an empty list or array passed in for x/y.