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

Skip to content

Commit 3db6512

Browse files
committed
Fixed a problem in the last commit
svn path=/trunk/matplotlib/; revision=8231
1 parent afa4889 commit 3db6512

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/matplotlib/backend_bases.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,17 +298,18 @@ def _iter_collection(self, gc, path_ids, offsets, offsetTrans, facecolors,
298298
xo, yo = toffsets[i % Noffsets]
299299
if Nfacecolors:
300300
rgbFace = facecolors[i % Nfacecolors]
301-
if len(rgbFace) == 4 and rgbFace[3] == 0:
302-
rgbFace = None
303301
if Nedgecolors:
304302
gc0.set_foreground(edgecolors[i % Nedgecolors])
305303
if Nlinewidths:
306304
gc0.set_linewidth(linewidths[i % Nlinewidths])
307305
if Nlinestyles:
308306
gc0.set_dashes(*linestyles[i % Nlinestyles])
309307
if rgbFace is not None and len(rgbFace)==4:
310-
gc0.set_alpha(rgbFace[-1])
311-
rgbFace = rgbFace[:3]
308+
if rgbFace[3] == 0:
309+
rgbFace = None
310+
else:
311+
gc0.set_alpha(rgbFace[-1])
312+
rgbFace = rgbFace[:3]
312313
gc0.set_antialiased(antialiaseds[i % Naa])
313314
if Nurls:
314315
gc0.set_url(urls[i % Nurls])

0 commit comments

Comments
 (0)