Closed jabowery closed 1 year ago
Hi @jabowery,
It sounds like you are having problems with the functions producing latex versions of the expressions generated by physo.
I am unable to reproduce this error on my ubuntu system.
Can you check that your version is:
matplotlib >= 3.5.1
Can you test that this snippet works correctly in the environment you are using to run physo ?
import sympy
import matplotlib.pyplot as plt
expr_str = "(sin(((ft)+phi))exp((alpha*-(t))))+1-1"
expr_sympy = sympy.parsing.sympy_parser.parse_expr(expr_str, evaluate=False)
expr_sympy = sympy.simplify(expr_sympy, rational=True)
expr_latex = sympy.latex (expr_sympy)
fig, ax = plt.subplots(1, 1, figsize=(10, 2)) ax.axis('off') text_pos = (0.0, 0.5) ax.text(text_pos[0], text_pos[1], f'${expr_latex}$', size = 16)
plt.show()
3. It looks like you are not the only one having this problem with matplotlib + latex, maybe this is useful ?
https://stackoverflow.com/questions/11354149/python-unable-to-render-tex-in-matplotlib
I corrected my situation by performing:
$ sudo apt install cm-super
It's rather strange that this font isn't installable under at least conda
if not pip
if there are going to be such dependencies.
Yes it is strange. If a lot of users end up encountering this issue, I might change the plot font to avoid such issues.
In Fedora 35, I kept having the "not found" error for type1ec.sty and type1cm.sty in matplotlib although both were installed. I was able to solve it installing texlive-psutils with dnf.
As per README.md instructions I got the error upon running the suggested unit test: