Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Closed
Milestone
Description
Bug report
Bug summary
Callingaxes.barh will throw this error if the height of the bars are given as a dictonary values typeTypeError: unsupported operand type(s) for +: 'int' and 'dict_values'
Code for reproduction
importmatplotlib.pyplotaspltdata= {'cats':10,'dogs':20}# Works as expectedfig,ax=plt.subplots(1)ax.bar(range(len(data)),data.values())# Doesn't workfig,ax=plt.subplots(1)ax.barh(range(len(data)),data.values())# Works as expectedfig,ax=plt.subplots(1)ax.barh(range(len(data)),list(data.values()))plt.show()
Metadata
Metadata
Assignees
Labels
No labels