Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Description
Bug report
Bug summary
The methodmatplotlib.axes._subplots.AxesSubplot.bar
has argumentleft
which is actually the center of the bar. The name of the argument leads to unexpected results.
Code for reproduction
importmatplotlib.pyplotaspltleft= [0,1,3]width= [1,2,1]height= [1,1,1]bottoms= [0,1,2]# Actualfig,ax=plt.subplots()forl,w,h,binzip(left,width,height,bottoms):ax.bar(left=l,width=w,height=h,bottom=b,color='blue')plt.show()# Expectedfig,ax=plt.subplots()forl,w,h,binzip(left,width,height,bottoms):ax.bar(left=l+w/2,width=w,height=h,bottom=b,color='blue')plt.show()
Actual outcome
The following is an text representation of the figure produced:
3 | [------------------] 2 | [--------------------------------] 1 | [-------------]-0.5-----0.0-----0.5-----1.0-----1.5-----2.0-----2.5-----3.0-----3.5-----4.0**
Expected outcome
The following is an text representation of the figure produced:
3 | [------------------] 2 | [--------------------------------] 1 | [-------------]-0.5-----0.0-----0.5-----1.0-----1.5-----2.0-----2.5-----3.0-----3.5-----4.0**
Matplotlib version
- Operating System: Windows 10.0.15063
- Matplotlib Version: 2.0.2
- Python Version: Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)] on win32
- Jupyter Version (if applicable):
- Other Libraries:
conda install matplotlib
Using default channel.
Metadata
Metadata
Assignees
Labels
No labels