Skip to content

Commit 9b39ef8

Browse files
authored
Merge pull request #147 from danielhkl/master
bypassed the bug annotated in my last issue that png files are saved upside down
2 parents 04dc16e + 03231bf commit 9b39ef8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

matplotlib2tikz/image.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ def draw_image(data, obj):
3030
dims = img_array.shape
3131
if len(dims) == 2: # the values are given as one real number: look at cmap
3232
clims = obj.get_clim()
33+
34+
if obj.origin == "lower":
35+
img_array = numpy.flipud(img_array)
36+
3337
mpl.pyplot.imsave(fname=filename,
3438
arr=img_array,
3539
cmap=obj.get_cmap(),

0 commit comments

Comments
 (0)