Skip to content

ImageWidget with 3+ subplots requires figure_shape #818

Closed
@FlynnOConnell

Description

@FlynnOConnell

This does not work:

iw = fpl.ImageWidget(data=[data_raw, data_reg, mean_sub], names=["Raw", "Registered", "Reg, Mean-Sub"])
iw.show()

...
    158     if subplot_names.size != n_subplots:
--> 159         raise ValueError(
    160             f"must provide same number of subplot `names` as specified by shape, extents, or rects: {n_subplots}"

ValueError: must provide same number of subplot `names` as specified by shape, extents, or rects: 4

This is fixed by specifying figure shape:

iw = fpl.ImageWidget(data=[data_raw, data_reg, mean_sub], names=["Raw", "Registered", "Reg, Mean-Sub"], figure_shape=(1, 3))
iw.show()

This is confusing and took me a while to figure out

Metadata

Metadata

Assignees

No one assigned

    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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy