GeezerVison is showing github.com — `Figure` can accept `rects` or `extents` as an `dict` with keys indicating subplot names by kushalkolar · Pull Request #1014 · fastplotlib/fastplotlib
Conversation
kushalkolar
commented
Mar 17, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
I found it tedious creating a lot of custom subplots with defined extents and then assigning names to them separately, easy to get lost:
extents = [
(0, 0.33, 0.0, 0.25), # pmd
(0.33, 0.66, 0.0, 0.25), # ac
(0.66, 1, 0.0, 0.5), # beh left
(0, 0.33, 0.25, 0.5), # res
(0.33, 0.66, 0.25, 0.5), # bg
(0.66, 1, 0.5, 1.0), # beh right
(0, 0.66, 0.5, 0.75), # traces
(0, 0.66, 0.75, 1), # lightning pose ethogram
]
This PR allows rects or extents to be defined with a dict where keys are subplot names, much easier I think:
extents = {
"pmd": (0, 0.33, 0.0, 0.25),
"ac": (0.33, 0.66, 0.0, 0.25)
"res": (0, 0.33, 0.25, 0.5),
...
}
@clewis7 gtg if tests pass
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
kushalkolar
changed the title
Figure can accept rects or extents as an OrderedDict with keys indicating subplot names
Figure can accept rects or extents as an dict with keys indicating subplot names
Mar 17, 2026
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
clewis7
clewis7 approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|