Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Bug]: svg.fonttype = none and text.usetex = True not working together #22971

Copy link
Copy link
Open
@paulgoulain

Description

@paulgoulain
Issue body actions

Bug summary

When saving a figure in svg using the option text.usetex = True, the texts in the obtained svg picture are rendered as path.

Code for reproduction

from pathlib import Path
import matplotlib.pyplot as plt

this_dir = Path(__file__).parents[0]

plt.rcParams['svg.fonttype'] = 'none'
plt.rcParams['text.usetex'] = True

x = [0, 10]

fig, ax = plt.subplots()
ax.plot(x, x)
fig.savefig(this_dir/'test.svg')

Actual outcome

image

As an example, the label here is a path svg object.

Expected outcome

image

Here the same plot, with the line plt.rcParams['text.usetex'] = True commented

Additional information

No response

Operating system

Windows

Matplotlib Version

3.5.2

Matplotlib Backend

No response

Python version

3.10

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.