SarthakJariwala / seaborn-image

High-level API for attractive and descriptive image visualization in Python
https://seaborn-image.readthedocs.io/
MIT License
66 stars 7 forks source link

Add option in ImageGrid to automatically detect the aspect ratio to use #732

Closed eugenioLR closed 1 month ago

eugenioLR commented 3 months ago

I have been using ImageGrid to plot images with shapes like 20x40 and i noticed there was a lot of white space between them. I thought this was a bug and i was just about to report it, but i noticed that there is a parameter called aspect that can be set to be the same as the inputted images which solves the issue.

I think it would be a good idea to have this parameter be adjusted automatically instead of being 1 by default. Probably setting it to 'auto' and calculating it as the minimum of the ratio between length and width of all the images.

If this sounds good I can get to it and make a pull request.

SarthakJariwala commented 3 months ago

Thanks - I think auto detecting aspect ratio sounds good to me. I'll take a look at the PR soon (maybe today or tomorrow)