By the way, I just realized that the XML string for the SVG figure differs between Python 2/Matplotlib 2.2.3 and Python3/Matplotlib 3.0.3.
In Python3, the string was encoded as byte so the command has to be modified with .decode("utf-8")
plt.savefig(buffer, format='svg')
output_table['plot']=[buffer.getvalue().decode("utf-8")]
I expect something similar for PNG with a different argument for decode but I could not find out.