Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/matplotlib/backends/backend_pdf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-

"""
A PDF matplotlib backend
Expand Down Expand Up @@ -1625,6 +1625,8 @@ def check_gc(self, gc, fillcolor=None):
gc._fillcolor = fillcolor

orig_alphas = getattr(gc, '_effective_alphas', (1.0, 1.0))
if gc.get_rgb() is None:
gc.set_foreground([0.0, 0.0, 0.0, 1.0])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why black? This should probably have 0 alpha?

@ghost ghost May 19, 2017 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure what the alpha value has to do. I simply revert the unwanted behavior of #5596 i.e. in the function Line2D.draw(renderer), with the above setting, prior to the the change-set, at line 830, edgecolor (returned by Line2D.get_markeredgecolor())would be 'k', and after the call gc.set_foreground(edgecolor) on line 835, gc._rgb takes the value that I set. Will put a test case tomorrow to check to be sure that I did not miss anything.


if gc._forced_alpha:
gc._effective_alphas = (gc._alpha, gc._alpha)
Expand Down