Bug summary
The tight bounding box of a Wedge 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
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle, Wedge
fig, ax = plt.subplots()
wedge = Wedge(0.5, 0.4, 10, 30)
ax.add_patch(wedge)
# Plot bounding box
renderer = 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

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
Bug summary
The tight bounding box of a
Wedgepatch 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
Actual outcome
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