Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
Description
Bug summary
PaddedBox
https://matplotlib.org/stable/api/offsetbox_api.html#matplotlib.offsetbox.PaddedBox doesn't look like it is working properly.
Code for reproduction
importmatplotlib.pyplotaspltfrommatplotlib.offsetboximportPaddedBox,AnchoredTextfig,ax=plt.subplots()at=AnchoredText("foo",'upper left')pb=PaddedBox(at,pad=1,patch_attrs={'facecolor' :'r'},draw_frame=True)ax.add_artist(pb)fig.show()
Actual outcome
Expected outcome
Red box is at same location as text.
Additional information
It seems like the sizing is working OK (using a longer string will change the size accordingly), but that the positioning is not working.
Also, not passingpad
leads to an error, so it should probably be 0. as default rather thanNone
.
Operating system
No response
Matplotlib Version
main
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
git checkout