Skip to content

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

Closed
@rpshaw

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.

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