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

Skip to content

Commit ecf2e34

Browse files
committed
Merge pull request #1 from mdboom/interps
Fixes the SVG issues with "none" interpolation
2 parents 6923c7f + 29b593f commit ecf2e34

File tree

2 files changed

+85
-84
lines changed

2 files changed

+85
-84
lines changed

lib/matplotlib/backends/backend_svg.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,11 +764,12 @@ def draw_image(self, gc, x, y, im, dx=None, dy=None, transform=None):
764764
width=str(w), height=str(h),
765765
attrib=attrib)
766766
else:
767+
flipped = self._make_flip_transform(transform)
767768
attrib['transform'] = generate_transform(
768-
[('matrix', transform.to_values())])
769+
[('matrix', flipped.to_values())])
769770
self.writer.element(
770771
'image',
771-
x=str(x), y=str(y), width=str(dx), height=str(dy),
772+
x=str(x), y=str(y+dy), width=str(dx), height=str(-dy),
772773
attrib=attrib)
773774

774775
if url is not None:

0 commit comments

Comments
 (0)