Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4e6b2c0

Browse filesBrowse files
committed
Merge remote-tracking branch 'upstream/v1.2.x'
2 parents da47d2d + 4ed5a8c commit 4e6b2c0
Copy full SHA for 4e6b2c0

File tree

Expand file treeCollapse file tree

5 files changed

+310
-5
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+310
-5
lines changed

‎lib/matplotlib/backends/backend_pdf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pdf.py
+12-5Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ def draw_markers(self, gc, marker_path, marker_trans, path, trans, rgbFace=None)
15561556
return
15571557

15581558
self.check_gc(gc, rgbFace)
1559-
fillp = gc.fillp()
1559+
fillp = gc.fillp(rgbFace)
15601560
strokep = gc.strokep()
15611561

15621562
output = self.file.output
@@ -2002,13 +2002,20 @@ def strokep(self):
20022002
return (self._linewidth > 0 and self._alpha > 0 and
20032003
(len(self._rgb) <= 3 or self._rgb[3] != 0.0))
20042004

2005-
def fillp(self):
2005+
def fillp(self, *args):
20062006
"""
20072007
Predicate: does the path need to be filled?
2008+
2009+
An optional argument can be used to specify an alternative
2010+
_fillcolor, as needed by RendererPdf.draw_markers.
20082011
"""
2009-
return self._hatch or \
2010-
(self._fillcolor is not None and
2011-
(len(self._fillcolor) <= 3 or self._fillcolor[3] != 0.0))
2012+
if len(args):
2013+
_fillcolor = args[0]
2014+
else:
2015+
_fillcolor = self._fillcolor
2016+
return (self._hatch or
2017+
(_fillcolor is not None and
2018+
(len(_fillcolor) <= 3 or _fillcolor[3] != 0.0)))
20122019

20132020
def close_and_paint(self):
20142021
"""
Binary file not shown.
Loading
+289Lines changed: 289 additions & 0 deletions
Loading

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,15 @@ def test_hist_stacked_weighted():
901901
ax = fig.add_subplot(111)
902902
ax.hist( (d1, d2), weights=(w1,w2), histtype="stepfilled", stacked=True)
903903

904+
@image_comparison(baseline_images=['transparent_markers'], remove_text=True)
905+
def test_transparent_markers():
906+
np.random.seed(0)
907+
data = np.random.random(50)
908+
909+
fig = plt.figure()
910+
ax = fig.add_subplot(111)
911+
ax.plot(data, 'D', mfc='none', markersize=100)
912+
904913
if __name__=='__main__':
905914
import nose
906915
nose.runmodule(argv=['-s','--with-doctest'], exit=False)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.