Skip to content

edgecolor arg set to scalar applies to the first bar in bar() method #9818

Closed
@maximtrp

Description

@maximtrp

Bug report

Bug summary

Edgecolor argument to the bar() method (either matplotlib.axes.axes.bar() or matplotlib.pyplot.bar()) when set to a scalar, applies only to the first bar, but not to the rest. See the code below.

Code for reproduction

plt.bar([1,2,3], [20,30,40], edgecolor='0', linewidth=2)

If I change it to:

plt.bar([1,2,3], [20,30,40], edgecolor=['0', '0', '0'], linewidth=2)

it works, and I get all the edgelines as expected.

Actual outcome

Screenshot: https://imgur.com/a/zQTSS

Expected outcome

The expected outcome is that all bars have the same edgecolors and linewidths (when set to a scalar).
It worked on matplotlib 2.0.0, but stopped working on 2.1.0 version.

Matplotlib version

  • Operating system: Linux 3.14.79-27-ARCH
  • Matplotlib version: 2.1.0
  • Matplotlib backend: module://ipykernel.pylab.backend_inline
  • Python version: Python 3.6.3, [GCC 7.2.0] on linux
  • Jupyter version (if applicable): jupyter-client 5.1.0, jupyter-console 5.2.0, jupyter-core 4.4.0
  • Other libraries:

Matplotlib was installed from ALARM repository (Arch Linux ARM, python-matplotlib package).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions