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

Skip to content

Commit aa60d8a

Browse files
committed
Fixed draw_image bug in cairo backend
svn path=/trunk/matplotlib/; revision=3476
1 parent c92a7d2 commit aa60d8a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/matplotlib/backends/backend_cairo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ def draw_image(self, x, y, im, bbox):
155155

156156
rows, cols, buf = im.color_conv (BYTE_FORMAT)
157157
surface = cairo.ImageSurface.create_for_data (
158-
buf, cairo.FORMAT_ARGB32, rows, cols, rows*4)
159-
158+
buf, cairo.FORMAT_ARGB32, cols, rows, cols*4)
160159
# function does not pass a 'gc' so use renderer.ctx
161160
ctx = self.ctx
162161
y = self.height - y - rows

0 commit comments

Comments
 (0)