Encountered a strange error shown in a small IPython Notebook here : https://gist.github.com/goulu/ba518d1a0a5267c0d3f3
in the method repr_svg method that generates a svg plot for IPython Notebook ( 2.7 kernel )
plt.legend()
savefig(output, format='svg')
generates content like
for "-5" in the legend, which causes a UnicodeDecodeError in JSON via Jupyter client