Skip to content

Commit f06b7ed

Browse files
authored
Merge pull request #131 from boeddeker/patch-2
Suggestion: replace image filename
2 parents 20679bb + aa76fbb commit f06b7ed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

matplotlib2tikz/image.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ def draw_image(data, obj):
1818
file_exists = True
1919
while file_exists:
2020
data['img number'] = data['img number'] + 1
21-
filename = os.path.join(data['output dir'],
22-
'img' + str(data['img number']) + '.png'
23-
)
21+
filename = os.path.join(
22+
data['output dir'],
23+
data['base name'] + str(data['img number']) + '.png'
24+
)
2425
file_exists = os.path.isfile(filename)
2526

2627
# store the image as in a file

0 commit comments

Comments
 (0)