move viewport rect logic from subplot and docks to Figure#724
Merged
Conversation
Member
Author
|
|
Member
Author
|
@clewis7 ready for review! Any ubuntu tests won't pass on github actions due to pygfx/pygfx#979 but the mac tests should all pass (except for pygfx-release, the ones using pygfx@main should pass) also tests are all passing locally |
clewis7
requested changes
Feb 16, 2025
Member
Author
|
all relevant tests passing now except the docs build but you fixed that in another PR so this is good for another look! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step towards #315 and #670
Things will change once pygfx refactors their viewport stuff, but I think it will be easier to adopt those changes after this PR since it makes
Figuremanage the bbox of all subplots. I think this is a good separation of responsibilities. After this PR arbitrary bboxes for subplots can be implemented.Figure.Figure._render()andPlotArea._render()are now private, been meaning to do this for a long while.cameras,controllersarrays inFigureto prep things for a flexible rectangles mode.Figurefor flex rects mode by allowingFigure._subplotsto be a 1D object array, figure methods have been adjusted accordingly.Figure.spacingis a new property which allows setting the spacing between subplots, default is 2 pixelsImageWidgetwith all docks set to a certain size.Introduces one minor breaking API change,
Subplot.positionno longer exists but it's unlikely anyone was using that.Todo in future PR: