Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some crashes in the SVG backend #426

Merged
merged 1 commit into from Aug 19, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/matplotlib/backends/backend_svg.py
Expand Up @@ -641,12 +641,12 @@ def draw_gouraud_triangle(self, gc, points, colors, trans):
x1=str(x1), y1=str(y1), x2=str(xb), y2=str(yb))
writer.element(
'stop',
offset=0,
offset='0',
style=generate_css({'stop-color': rgb2hex(c),
'stop-opacity': str(c[-1])}))
writer.element(
'stop',
offset=1,
offset='1',
style=generate_css({'stop-color': rgb2hex(c),
'stop-opacity': "0"}))
writer.end('linearGradient')
Expand Down Expand Up @@ -788,7 +788,7 @@ def _draw_text_as_path(self, gc, x, y, s, prop, angle, ismath):
if color != '#000000':
style['fill'] = color
if gc.get_alpha() != 1.0:
style['opacity'] = gc.get_alpha()
style['opacity'] = str(gc.get_alpha())

if not ismath:
font = text2path._get_font(prop)
Expand Down Expand Up @@ -891,7 +891,7 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath):
if color != '#000000':
style['fill'] = color
if gc.get_alpha() != 1.0:
style['opacity'] = gc.get_alpha()
style['opacity'] = str(gc.get_alpha())

if not ismath:
font = self._get_font(prop)
Expand Down
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/pcolormesh.pdf
Binary file not shown.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/pcolormesh.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.