-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move viewport rect logic from subplot and docks to Figure #724
Conversation
|
@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 |
all relevant tests passing now except the docs build but you fixed that in another PR so this is good for another look! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
Figure
manage 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
,controllers
arrays inFigure
to prep things for a flexible rectangles mode.Figure
for flex rects mode by allowingFigure._subplots
to be a 1D object array, figure methods have been adjusted accordingly.Figure.spacing
is a new property which allows setting the spacing between subplots, default is 2 pixelsImageWidget
with all docks set to a certain size.Introduces one minor breaking API change,
Subplot.position
no longer exists but it's unlikely anyone was using that.Todo in future PR: