FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Cairo backend discards alpha channel for collections · Issue #12773 · matplotlib/matplotlib · GitHub

Repository navigation

Cairo backend discards alpha channel for collections #12773

Closed

Description

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

Expected outcome
Expected output when using the default Qt5Agg backend:

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:

Activity

  1. added a commit that references this issue on Nov 8, 2018
    325e698
  2. anntzer commented on Nov 12, 2018

    Contributor

    Thanks for #12774.
    As a curiosity: why are you using the cairo backend? Are you aware of my rewrite of that backend in https://github.com/anntzer/mplcairo?

  3. joh commented on Nov 14, 2018

    ContributorAuthor

    I'm using the cairo backend via FigureCanvasGTK3Cairo to embed some plots in Gtk3. I was not aware of your rewrite of that backend, will check it out :) are there plans to merge your port to matplotlib master?

  4. anntzer commented on Nov 14, 2018

    Contributor

    Not in the short term, as there are serious technical hurdles to doing that (mostly, the static linking of a recent c++ standard library).

  5. added a commit that references this issue on Nov 28, 2018
    eeb63ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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


      Back | FazBrowse Home | New Git URL