| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| 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...
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe add a comment mentioning this?
Sorry, something went wrong.
There was a problem hiding this comment.
Good idea. Comment added.
Sorry, something went wrong.
|
Concerning a test, the ugly result would be reproduced when calling fig.set_size_inches((7,4)) after creating the secondary axes and before drawing/saving it. |
Sorry, something went wrong.
|
Added test - fails on master, passes w/ this PR |
Sorry, something went wrong.
|
Good catch. bb = mtransforms.TransformedBbox(
mtransforms.Bbox.from_bounds(*rect),
mtransforms.BboxTransformFrom(parent.bbox)
+ mtransforms.BboxTransformTo(parent.figure.bbox))
def secondary_locator(ax, renderer):
return bb
return secondary_locator
which also works, and avoids constructing new transform nodes at each call (#12031). |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
Indeed, sorry. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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