X Tutup
Skip to content

UnicodeDecodeError in IPython Notebook caused by negative numbers in plt.legend() #5499

@goulu

Description

@goulu

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

<!-- \xe2\x88\x925 --> 

for "-5" in the legend, which causes a UnicodeDecodeError in JSON via Jupyter client

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup