Skip to content

Fix traceback for vlines/hlines, when an empty list or array passed in for x/y. #1000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 10, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
oops; failed to commit after fixing this little bugaboo; should have …
…been len(y) instead of len(x)
  • Loading branch information
dhyams committed Jul 10, 2012
commit d65269db2bce724a9853b763264ca4ef8980b38d
2 changes: 1 addition & 1 deletion lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3626,7 +3626,7 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
self.add_collection(coll)
coll.update(kwargs)

if len(x) > 0:
if len(y) > 0:
minx = min(xmin.min(), xmax.min())
maxx = max(xmin.max(), xmax.max())
miny = y.min()
Expand Down