Skip to content

Adding hatches changes face color #14639

@SMZ70

Description

@SMZ70

Bug report

Bug summary

Adding hatches results in a change in the face color of bars. The problem occurs when saved as PDF. Everything is ok with png.

Code for reproduction

import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.barh(2, 4, edgecolor='black', facecolor='green', alpha=0.3)
ax.barh(3, 4, edgecolor='black', facecolor='green', hatch='///', alpha=0.3)
fig.savefig('hbarplot.pdf')
fig.savefig('hbarplot.png')

Actual outcome

image

Expected outcome

The plot in the pdf file to be the same as the one in png file.

Matplotlib version

  • Operating system: Windows 10
  • Matplotlib version: 3.0.3, conda, default
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg or module://ipykernel.pylab.backend_inline (problem occurs with both)
  • Python version: 3.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy