GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@kushalkolar kushalkolar commented Mar 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions
kushalkolar added 2 commits March 17, 2026 07:31
@kushalkolar
extents or rects can also be an OrderedDict
09907f5
@kushalkolar
black
d969a79
@kushalkolar
kushalkolar requested a review from clewis7 as a code owner March 17, 2026 11:40
@kushalkolar
even better, just regular dict
159a40e
@kushalkolar 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
@github-actions

github-actions Bot commented Mar 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

📚 Docs preview built and uploaded! https://www.fastplotlib.org/ver/extent-rect-named

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

clewis7
clewis7 approved these changes Mar 17, 2026
View reviewed changes
@clewis7
clewis7 merged commit 4a13244 into main Mar 17, 2026
27 of 36 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@clewis7
clewis7 deleted the extent-rect-named branch March 17, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@clewis7 clewis7 clewis7 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

2 participants

@kushalkolar @clewis7
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.