Closed
Description
Bug report
Only the first bar in barplot has border when edgecolor is a single value.
Bug summary
Code for reproduction
import matplotlib.pyplot as plt
def main():
fig = plt.figure()
ax = plt.gca()
data = list(range(5, 10))
ax.bar(data, data, width=0.5, align="edge", linewidth=2,
edgecolor="k", facecolor="m")
plt.show()
if __name__ == '__main__':
main()
Expected outcome
I can work around the issue by specifying a list of edgecolors and linewidths for each bar. Specifying only the list of linewidths for each bar and leaving one value for the edgecolor would only show a border of the first bar due to this code in the Patch.draw:
lw = self._linewidth
if self._edgecolor[3] == 0:
lw = 0
Matplotlib version
- Operating system: Linux
- Matplotlib version: 2.1.0
- Matplotlib backend (
print(matplotlib.get_backend())
): TkAgg - Python version: Python 3.6.2
I installed matplotlib using conda. But I am not sure from which channel.
Metadata
Metadata
Assignees
Labels
No labels