8000 Cairo backend discards alpha channel for collections · Issue #12773 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Cairo backend discards alpha channel for collections #12773
Closed
@joh

Description

@joh

Bug report

The cairo backend ignores the alpha value of artists when rendering Collections such as PatchCollection.

Code for reproduction

import matplotlib
matplotlib.use('Cairo')
import matplotlib.pyplot as plt
from matplotlib.collections import PatchCollection
import numpy as np

circles = [plt.Circle((i,i), 1.0) for i in np.arange(10)]
col = PatchCollection(circles, alpha=0.5)
ax = plt.gca()
ax.add_collection(col)
ax.autoscale_view()
plt.savefig('test_cairo_alpha.png')

Actual outcome

test_cairo_alpha_actual

Expected outcome
Expected output when using the default Qt5Agg backend:

test_cairo_alpha_expected

Matplotlib version

  • Operating system: Ubuntu 18.04
  • Matplotlib version: master @ 4dbbd22
  • Matplotlib backend (print(matplotlib.get_backend())): cairo
  • Python version: 3.6.6
  • Jupyter version (if applicable):
  • Other libraries:

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

      0