I do not remember the details but my recollection is that AnchoredText (and its siblings) is meant to be a top level object in the offsetbox chain. So, PaddedBox (likely any offsetbox) is not supposed to have any anchored children.
Here is working example, that uses AnchoredOffsetbox, instead.
I guess that it may be good with some sort of clarification how the hierarchy of offset boxes works, so adding the doc label.
If I understand it correctly, some, like TextArea and DrawingArea are the "base artists". These can be put in PaddedBox and Packers. Any of the earlier can then be put in Anchored*?
Correct. OffsetBox knows it size but not its position. Its parent should set its position at the drawing time. So, the top-most parent of offsetboxes should be Anchored* or AnnotationBbox that know how to position their children.
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Activity
leejjoon commented on Dec 7, 2022
I do not remember the details but my recollection is that AnchoredText (and its siblings) is meant to be a top level object in the offsetbox chain. So, PaddedBox (likely any offsetbox) is not supposed to have any anchored children.
Here is working example, that uses AnchoredOffsetbox, instead.
oscargus commented on Dec 9, 2022
I guess that it may be good with some sort of clarification how the hierarchy of offset boxes works, so adding the doc label.
If I understand it correctly, some, like TextArea and DrawingArea are the "base artists". These can be put in PaddedBox and Packers. Any of the earlier can then be put in Anchored*?
leejjoon commented on Dec 9, 2022
Correct. OffsetBox knows it size but not its position. Its parent should set its position at the drawing time. So, the top-most parent of offsetboxes should be Anchored* or AnnotationBbox that know how to position their children.
github-actions commented on Feb 2, 2026
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!