Skip to content

Test nearest and none interpolation better #476

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

Merged
merged 3 commits into from
Sep 23, 2011
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix images with "none" interpolation in the SVG backend. Inkscape doe…
…sn't like images with negative dimensions, so change to positive and adjust the offset accordingly.
  • Loading branch information
mdboom committed Sep 20, 2011
commit 29b593f8296bda02eb63510c5c60a1365fa2ca43
5 changes: 3 additions & 2 deletions lib/matplotlib/backends/backend_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,11 +764,12 @@ def draw_image(self, gc, x, y, im, dx=None, dy=None, transform=None):
width=str(w), height=str(h),
attrib=attrib)
else:
flipped = self._make_flip_transform(transform)
attrib['transform'] = generate_transform(
[('matrix', transform.to_values())])
[('matrix', flipped.to_values())])
self.writer.element(
'image',
x=str(x), y=str(y), width=str(dx), height=str(dy),
x=str(x), y=str(y+dy), width=str(dx), height=str(-dy),
attrib=attrib)

if url is not None:
Expand Down
Loading