Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

save matplotlib figure with base64

import cStringIO
my_stringIObytes = cStringIO.StringIO()
plt.savefig(my_stringIObytes, format='jpg')
my_stringIObytes.seek(0)
my_base64_jpgData = base64.b64encode(my_stringIObytes.read())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #save #matplotlib #figure
ADD COMMENT
Topic
Name
2+3 =