Skip to content

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

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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions