Giter Site home page Giter Site logo

Comments (4)

jabowery avatar jabowery commented on May 19, 2024 1

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.

from physo.

WassimTenachi avatar WassimTenachi commented on May 19, 2024

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.

  1. Can you check that your version is:
matplotlib >= 3.5.1
  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(((f*t)+phi))*exp((alpha*-(t))))+1-1"

# Getting a sympy expression
expr_sympy = sympy.parsing.sympy_parser.parse_expr(expr_str, evaluate=False)

# If you want the simplified version
expr_sympy = sympy.simplify(expr_sympy, rational=True)

# Getting a latex expression
expr_latex = sympy.latex (expr_sympy)

# Getting a figure containing expression
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()
  1. 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

from physo.

WassimTenachi avatar WassimTenachi commented on May 19, 2024

Yes it is strange.
If a lot of users end up encountering this issue, I might change the plot font to avoid such issues.

from physo.

ale-munozarancibia avatar ale-munozarancibia commented on May 19, 2024

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.

from physo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.