Skip to content

inconsistent hatch and border color in barh in matplotlib 2.1.0 #9808

Closed

Description

@amueller

Bug report

It seems edgecolor and hatch is not applied to all bars in a barh in 2.1.0

Code for reproduction

bars = plt.barh(y=range(5), width=5, height=.6,  edgecolor='k', linewidth=5)

Actual outcome

image

Expected outcome

edge on all bars

Matplotlib version

  • Operating system:
  • Matplotlib version: 2.1.0
  • Matplotlib backend: module://ipykernel.pylab.backend_inline

Other interesting phenomenon:
combining edgecolor and hatch makes hatch only be applied to the first bar:

bars = plt.barh(y=range(5), width=5, height=.6, hatch="//", edgecolor='k', linewidth=5)

image
but hatch on itself works as expected:

bars = plt.barh(y=range(5), width=5, height=.6, hatch="//")

image

(the linewidth is not required to reproduce anywhere, it's just to make the effect more visible)

Activity

  1. added this to the v2.1.1 milestone on Nov 17, 2017
  2. jklymak commented on Nov 17, 2017

    @jklymak
    Member

    Thanks for the bug report! The snippet above works on master and the fix will be in 2.1.1. See #9351

  3. jklymak commented on Nov 17, 2017

    @jklymak
    Member

    Please feel free to re-open if 2.1.1 doesn't fix it for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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