Skip to content

Superimposing Reference Frames #772

Open

Description

@kushalkolar

I think we can easily have multiple different reference spaces in one PlotArea using the Scene's world affine transform's scale, i.e. Scene.world.scale. Would be the way we do things like matplotlib's twinx functionality, but we can do it much more elegantly.

Also automatic linking with selectors to update the axes. Allow update the "reference space" ranges dynamically using a selector. For example, to show a zoomed in range of a large range in another subplot, update the axes dymically.

Activity

  1. deleted a comment from on Mar 18, 2025
  2. kushalkolar commented on May 1, 2025

    @kushalkolar
    MemberAuthor

    Played with things a bit, I think a better way is to scale the camera for a given reference space and not the scene!

    A reference space can maybe be some simple abstraction of the PlotArea class, i.e. mulitple plot areas overlaid to create a subplot. Need to see how controllers and stuff works with this!

    Issue with this is that it adds a new render call for every reference space 🤔

  3. kushalkolar commented on May 1, 2025

    @kushalkolar
    MemberAuthor

    Some things to think about:

    • moving things from one reference space to another
      • if a Graphic is moved to another reference space, also move any selectors that have this Graphic as their parent
  4. changed the title [-]Model space[/-] [+]Superimposing Reference Spaces[/+] on May 2, 2025
  5. kushalkolar commented on May 2, 2025

    @kushalkolar
    MemberAuthor

    PlotArea should have a primary reference frame which is accessed using the current API, i.e. PlotArea.scene, PlotArea.camera etc. all point to the primary ReferenceFrame. All additional reference frames must be accessed explicitly. I think this makes sense, the majority of use cases involve just one reference frame and it would be tedious a big API change to always explicitly access the primary reference frame.

    Not sure if PlotArea.auto_scale() and other similar function should only autoscale the primary reference frame or all reference frames? What should the methods for affecting all reference frames be? Such as for centering all frames so that their origins overlap?

  6. changed the title [-]Superimposing Reference Spaces[/-] [+]Superimposing Reference Frames[/+] on May 6, 2025
  7. kushalkolar commented on May 14, 2025

    @kushalkolar
    MemberAuthor

    It would be very useful to be able to have cameras or scenes (depending on how we implement this) at different scales, and then be able to pan and zoom in the main reference frame and have another controller that pans to the same worldspace position in another reference frame.

    Example usecase: Here I wanted to understand the clipping behavior of the image in the top middle subplot ("Cb") and compare it with the border pixels (red rectangle) in the corresponding bottom middle plot ("Cb-skimage"). They are at diferent scales (the top one is subsampled by a factor of 2) but I still want to be able to pan and zoom the bottm and top together to compare them:

    Image

  8. kushalkolar commented on Oct 18, 2025

    @kushalkolar
    MemberAuthor

    Founds notes from meeting with Almar and Caitlin in June:

    • limit to only 1 axis having a different scale, all other dims must be identical
      • For now try with having only 2 reference frames
      • Need to fix camera linking first, I think it works now but need to check
  9. self-assigned this
    on Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions