Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeX text rendering is broken for Maplotlib version > 3.5.0 #8

Open
yves-surrel opened this issue May 23, 2024 · 0 comments
Open

LaTeX text rendering is broken for Maplotlib version > 3.5.0 #8

yves-surrel opened this issue May 23, 2024 · 0 comments

Comments

@yves-surrel
Copy link

Thank you for maintaining Matplotlib garden flower!

Rendering LateX text (as in axes.text(0.5, 0.9, '$\sigma$')) is broken with MatplotLib > 3.5.0:

File ~/mambaforge/lib/python3.9/site-packages/kivy_garden/matplotlib/backend_kivy.py:871 in get_text_width_height_descent
    ftimage, depth = self.mathtext_parser.parse(s, self.dpi, prop)

ValueError: too many values to unpack (expected 2)

This is due to the new behaviour of matplotlib.mathtext.MathTextParser.parse() (from the doc).

Depending on the output type, this returns either a VectorParse or a RasterParse

As in RendererKivy.__init__() the MathTextParseris created with the 'agg' output, a RasterParse (NamedTuple with more than 2 items) is returned.

Also, it seems that the LaTeX rendering has undergone many other changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant