8000 Merge pull request #18892 from ischurov/master · matplotlib/matplotlib@5184577 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5184577

Browse files
authored
Merge pull request #18892 from ischurov/master
Fixes MIME type for svg frame_format in HTMLWriter.
2 parents e05645c + 9e823c9 commit 5184577

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/animation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,9 @@ def _included_frames(paths, frame_format):
767767

768768
def _embedded_frames(frame_list, frame_format):
769769
"""frame_list should be a list of base64-encoded png files"""
770+
if frame_format == 'svg':
771+
# Fix MIME type for svg
772+
frame_format = 'svg+xml'
770773
template = ' frames[{0}] = "data:image/{1};base64,{2}"\n'
771774
return "\n" + "".join(
772775
template.format(i, frame_format, frame_data.replace('\n', '\\\n'))

0 commit comments

Comments
 (0)
0