FIX: secondary_axis resize#13419
Conversation
| bb = mtransforms.TransformedBbox(bb, tr) | ||
|
|
||
| def secondary_locator(ax, renderer): | ||
| bb = mtransforms.TransformedBbox(_rect, parent.transAxes) |
There was a problem hiding this comment.
@anntzer I knew there was a reason for this song and dance...
There was a problem hiding this comment.
Maybe add a comment mentioning this?
There was a problem hiding this comment.
Good idea. Comment added.
58b40fb to
5cd9676
Compare
|
Concerning a test, the ugly result would be reproduced when calling |
|
Added test - fails on master, passes w/ this PR |
5114f7d to
f96eba8
Compare
|
Good catch. which also works, and avoids constructing new transform nodes at each call (#12031). |
|
That makes there be no secondary axis rendered at all (or I guess its located off page?) I'm pretty sure parent_bbox has to be the draw-time bbox, not the locator instantiation bbox. |
|
Indeed, sorry. |
PR Summary
As pointed out by @ImportanceOfBeingErnest the new secondary_axis (#11859) didn't survive a resize. This new version does.
Is there a good way to test resizing a canvas?
closes: #13417
PR Checklist