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]: title position incorrect for polar plot #29381

Closed
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.status: confirmed bug
Milestone
@jkittner

Description

@jkittner

Bug summary

When using a polar coordinate system the plot title overlaps with the axis labels. This worked in 3.9.4 and broke with 3.10.0. This commit broke it:8abe308 via#28300

Code for reproduction

importmatplotlib.pyplotaspltplt.polar([0,1], [0,1])plt.title('My Title')plt.savefig('output.png')

Actual outcome

The title overlaps the axis labels

grafik

Expected outcome

The title should be above the axis labels

grafik

Additional information

  • This bug happens with the new 3.10 version, but with the 3.9.4 version
    I performed a git bisect using this:
 git bisect start
git bisect good v3.9.4
git bisect bad HEAD

a small test scriptcheck.py - there's probably a better way, but that's what I came up with. (Note that the issues also comes up when not using `bbox_inches='tight', but this way it was easier to bisect, since I could instrument the image size)

importmatplotlib.pyplotaspltfromPILimportImagedefmain():plt.polar([0,1], [0,1])plt.title('My Title')plt.savefig('output.png',bbox_inches='tight')withImage.open('output.png')asimg:size=img.sizeifsize!= (453,464):return1else:return0if__name__=='__main__':raiseSystemExit(main())

finally,

git bisect run python3 check.py

After a few steps it yielded this suspicious commit:8abe308 (cc@rcomer) which was merged in#28300

Operating system

Ubuntu 22.04

Matplotlib Version

3.10.0.dev1180+gc2d502d219

Matplotlib Backend

agg

Python version

3.13.1

Jupyter version

No response

Installation

git checkout

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.status: confirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp