8000 star (*) symbol in text box cuts off bottom of text when saved · Issue #15313 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
star (*) symbol in text box cuts off bottom of text when saved #15313
Open
@christopherlovell

Description

@christopherlovell

Bug report

Bug summary

When using the star (*) symbol in a text box, it cuts off the bottom of the text when saved (savefig). This is only the case when usetex=False in rcParams.

Code for reproduction

import matplotlib
import matplotlib.pyplot as plt

from matplotlib import rc
rc('text', usetex=False)

fig, ax = plt.subplots(1,1)
ax.text(0.5, 0.5, '$S_{*} M^{ath}$ and some not math',
         transform=ax.transAxes)
plt.savefig('test1.png', bbox_inches='tight')

test2

You can see the bottom of the text box is cut off. Whereas this plots fine:

fig, ax = plt.subplots(1,1)
ax.text(0.5, 0.5, '$S_{ome} M^{ath}$ and some not math',
         transform=ax.transAxes)
plt.savefig('test1.png', bbox_inches='tight')

test1

Matplotlib version

  • Operating system: Unix
  • Matplotlib version: 3.1.1
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: Python 3.6.8 (default, Apr 25 2019, 21:02:35)

matplotlib installed from pip

  • Other libraries:

cycler==0.10.0
kiwisolver==1.1.0
numpy==1.17.2
pyparsing==2.4.2
python-dateutil==2.8.0
six==1.12.0

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

      0