Skip to content

Inconsistent handling of whitespace with LaTeX #4954

@lgeiger

Description

@lgeiger

Hi matplotlib developers,

I noticed some inconstancies regarding text rendering with usetex=True.
I placed the following text with plt.text() in my plot.

begin{eqnarray*}
\phi &=& 1.00 \pm 0.10 \\
a &=& 3.00 \pm 0.30 m \\
\frac{\chi^2}{ndof} &=& 1.13
\end{eqnarray*}

If the plot is saved as .png or .pdf, the whitespace around the equal signs is to big:
bildschirmfoto 2015-08-18 um 20 34 40

If saved as .svg everything looks good:
bildschirmfoto 2015-08-18 um 20 34 27

It would be great if whitespace would be consistent in all file formats.
A possibility to align text without LaTeX would also be greatly appreciated.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions