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

Skip to content

Commit 599caf6

Browse files
committed
Fix bug with alpha colors in Ps backend. Thanks Paul Novak.
svn path=/trunk/matplotlib/; revision=4869
1 parent 3098d1a commit 599caf6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/backends/backend_ps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def draw_tex(self, gc, x, y, s, prop, angle, ismath='TeX!'):
541541
corr = 0#w/2*(fontsize-10)/10
542542
pos = _nums_to_str(x-corr, y)
543543
thetext = 'psmarker%d' % self.textcnt
544-
color = '%1.3f,%1.3f,%1.3f'% gc.get_rgb()
544+
color = '%1.3f,%1.3f,%1.3f'% gc.get_rgb()[:3]
545545
fontcmd = {'sans-serif' : r'{\sffamily %s}',
546546
'monospace' : r'{\ttfamily %s}'}.get(
547547
rcParams['font.family'], r'{\rmfamily %s}')
@@ -597,7 +597,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath):
597597
fontname = font.get_fontname()
598598
fontsize = prop.get_size_in_points()
599599
rotate = '%1.1f rotate' % angle
600-
setcolor = '%1.3f %1.3f %1.3f setrgbcolor' % gc.get_rgb()
600+
setcolor = '%1.3f %1.3f %1.3f setrgbcolor' % gc.get_rgb()[:3]
601601
#h = 0
602602
ps = """\
603603
gsave

0 commit comments

Comments
 (0)