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]: Eqnarray in AnchoredText results in misplaced text (new in v3.6.0) #23977

Closed
@BogdanRajkov

Description

@BogdanRajkov

Bug summary

The title pretty much sums it up. I have no idea if this only happens for the eqnarray environment and AnchoredText or for all Latex text and other boxes, e.g. legends, but also don't have the time to test it myself. I'll simply keep using v3.5.3, but I hope this helps other people get to the root cause.

Code for reproduction

importnumpyasnpimportmatplotlib.pyplotaspltimportmatplotlibfrommatplotlib.offsetboximportAnchoredTextv=matplotlib.__version__fig,ax=plt.subplots()x=np.linspace(0,2*np.pi)y=np.sin(x)plt.plot(x,y)text= ('\\begin{eqnarray*}'f'foo\\\\'f'{v=}\\\\''\\end{eqnarray*}')at=AnchoredText(text,loc='upper left',prop={'usetex':True})# at = AnchoredText(text, loc='upper left')ax.add_artist(at)plt.show()

Actual outcome

new_behaviour

Expected outcome

old_behaviour

Additional information

I should mention that whenusetex is set to False, the text is displayed just fine (by text I mean the code, obviously it doesn't compile), so I can narrow it down at least that much.

Operating system

Windows 11

Matplotlib Version

3.6.0

Matplotlib Backend

QtAgg

Python version

Python 3.10.1

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp