gregsexton / gregsexton/ob-ipython

Corrupted SVG output (wrong encoding)

Open
#179 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
742
Forks
107
PR merge metrics
No merged PRs in 30d

Description

TL;DR:

Without modifications of sort (on my system), evaluating ipython code to output an svg produces a corrupted file.

Include `matplotlib.rcParams['axes.unicode_minus'] = False` to solve.

Long Explanation:

The problem happens ONLY when the graph goes negative and only with INLINE output.

With a plt.savefig everything is right, but there will be no automated org output.

I tracked this issue back to the fact that there is something wrong with the file formatter for the INLINE procedure.

I found out that the problem is relative to this other issue: https://stackoverflow.com/questions/30201310/use-of-hyphen-or-minus-sign-in-matplotlib-versus-compatibility-with-latex

A system-wide solution is to just include `matplotlib.rcParams['axes.unicode_minus'] = False` somewhere at the beginning of the chain of python source blocks.

Cheers,

NRZ

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.