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]: Wedge tight bounding box incorrect #21931

Open
@dstansby

Description

@dstansby

Bug summary

The tight bounding box of aWedge patch appears to be incorrect. I suspect this is HiDPI issue - multiplying x0/y0/width/height by 2 seems to result in the correct bounding box for me.

Code for reproduction

importmatplotlib.pyplotaspltfrommatplotlib.patchesimportRectangle,Wedgefig,ax=plt.subplots()wedge=Wedge(0.5,0.4,10,30)ax.add_patch(wedge)# Plot bounding boxrenderer=fig.canvas.get_renderer()bbox=wedge.get_tightbbox(renderer)rect=Rectangle((bbox.x0,bbox.y0),width=bbox.width,height=bbox.height,linewidth=72./fig.dpi,edgecolor="red",facecolor="none",transform=None)fig.add_artist(rect)plt.show()

Actual outcome

Screenshot 2021-12-11 at 17 41 18

Expected outcome

Red bounding box bounds the blue wedge.

Additional information

No response

Operating system

macOS

Matplotlib Version

3.6.0.dev1023+gb0f7b8aaf8

Matplotlib Backend

Qt5Agg

Python version

3.9.7

Jupyter version

No response

Installation

git checkout

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