Skip to content

barh edgecolor and hatch are not applied to all bars #9496

Closed

Description

@rpshaw

Bug report

Bug summary

When I specify edgecolor and hatch within pyplot.barh those settings are only applied to the first bar in the plot.

Code for reproduction

import matplotlib.pyplot as plt

values = [13, 2, 1, 1]
y_pos = [0, 1, 2, 3]
fig = plt.figure(figsize=(6.0, 3.3))
ax = fig.add_subplot(111)
ax.barh(y_pos,
        values,
        align="center",
        facecolor="white",
        edgecolor="blue",
        hatch="/",
        )
ax.set_yticks(y_pos)
ax.set_yticklabels([])
plt.show()

Actual outcome

test_barh

Expected outcome

All bars to show the blue edgecolor and hatch.

This worked in Matplotlib 2.0.1.

Matplotlib version

  • Operating system: Red Hat Enterprise Linux Workstation release 6.8 (Santiago)
  • Matplotlib version: 2.1.0
  • Matplotlib backend: 'Qt5Agg'
  • Python version: 3.6.2
  • Jupyter version (if applicable): N/A
  • Other libraries:

I installed this using the main channel of miniconda.

Activity

  1. afvincent commented on Oct 20, 2017

    @afvincent
    Contributor

    Thank you @rpshaw for reporting this issue. It seems to have been fixed on the master branch by #9353. Here is what I get when executing your example with a freshly fetched master:
    mwe_9496.

    Closing, but feel free to reopen if you think that I am missing something :).

  2. rpshaw commented on Oct 20, 2017

    @rpshaw
    Author

    Thanks for letting me know!

  3. QuLogic commented on Oct 20, 2017

    @QuLogic
    Member

    This is a duplicate of #9351 and was fixed by #9353 so should be in 2.1.1 when it's released.

  4. QuLogic commented on Oct 20, 2017

    @QuLogic
    Member

    Oops, sorry @afvincent; didn't notice you mentioned that already.

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions