Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Bug]: bbox computed incorrectly when using a superscript #21653

Open
@kc9jud

Description

@kc9jud

Bug summary

When including LaTeX with a superscript, the bbox is computed incorrectly.

Code for reproduction

importmatplotlib.pyplotaspltkw=dict(usetex=True,fontsize=40,bbox=dict(boxstyle='round,pad=0',fc='lightsteelblue',ec='none'))plt.axhline(y=0.7)plt.annotate('A',xy=(0.3,0.7),**kw)plt.annotate(r'$A$',xy=(0.4,0.7),**kw)plt.annotate(r'$^{\tiny 1}A$',xy=(0.5,0.7),**kw)plt.annotate(r'$^{\tiny 1j}A$',xy=(0.65,0.7),**kw)plt.axhline(y=0.4)plt.annotate('A',xy=(0.3,0.4),va='bottom',**kw)plt.annotate(r'$A$',xy=(0.4,0.4),va='bottom',**kw)plt.annotate(r'$^{1}A$',xy=(0.5,0.4),va='bottom',**kw)plt.annotate(r'$^{1j}A$',xy=(0.65,0.4),va='bottom',**kw)plt.show()

Actual outcome

Figure_1

Expected outcome

The bounding box should correctly surround the superscript.

Additional information

Related bugs:#7075#14177

Operating system

Ubuntu

Matplotlib Version

3.5.0

Matplotlib Backend

No response

Python version

3.8.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


      [8]ページ先頭

      ©2009-2025 Movatter.jp