Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 51f0705

Browse files
committed
MNT: use public API on gc not private attributes
1 parent 933c4f7 commit 51f0705

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,12 +1626,12 @@ def check_gc(self, gc, fillcolor=None):
16261626

16271627
orig_alphas = getattr(gc, '_effective_alphas', (1.0, 1.0))
16281628

1629-
if gc._rgb is None:
1629+
if gc.get_rgb() is None:
16301630
# it should not matter what color here
16311631
# since linewidth should be 0
16321632
# unless affected by global settings in rcParams
16331633
# hence setting zero alpha just incase
1634-
gc._rgb = [0, 0, 0, 0]
1634+
gc.set_foreground((0, 0, 0, 0), isRGBA=True)
16351635

16361636
if gc._forced_alpha:
16371637
gc._effective_alphas = (gc._alpha, gc._alpha)

0 commit comments

Comments
 (0)