Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Initial auto scaling bug with ImageWidget when there is one empty subplot  #355

Closed
@kushalkolar

Description

@kushalkolar

This works normally as expected:

iw = fpl.ImageWidget([np.random.rand(100, 512, 512)] * 6)
iw.show()

Initial black subplots because scaling is off:

iw = fpl.ImageWidget([np.random.rand(100, 512, 512)] * 5)
iw.show()

Another example:

iw = fpl.ImageWidget([np.random.rand(100, 512, 512)] * 8)
iw.show()

with 9 works as expected:

iw = fpl.ImageWidget([np.random.rand(100, 512, 512)] * 9)
iw.show()

I think this has to do with auto_scale() being called somewhere on the last subplot. If you first click the auto-scale button in the 5 subplots/images situation to make the images visible, and then call iw.gridplot[-1, -1].auto_scale() it reproduces the wrong auto-scaling.

@clewis7 is this what you were getting? It might be from the toolbar refactor. We need more tests 🥲

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