Skip to content

sub/superscripts should be moved further from the baseline following large delimiters #18086

Open
@anntzer

Description

@anntzer

Bug report

Bug summary

Matplotlib's mathtext appears not to take the size of the preceding glyph into account when positioning sub/superscripts.

Code for reproduction

from pylab import *
figtext(.4, .5, r"$\left[\frac{x}{y}\right]^2_n$")
figtext(.5, .5, r"$\left[\frac{x}{y}\right]^2_n$", usetex=True)

Actual outcome

out
Note that the baseline of the 2 is even lower than the baseline of the x in the mathtext case.

Expected outcome

Something approaching the usetex case.

Matplotlib version

  • Operating system: linux
  • Matplotlib version: master
  • Matplotlib backend (print(matplotlib.get_backend())): qt5agg
  • Python version: 38
  • Jupyter version (if applicable):
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Labels

    keepItems to be ignored by the “Stale” Github Actiontopic: text/mathtext

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions