-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic aspect ratio calculation #733
Conversation
…Grid with new aspect ratio argument
It doesn't seem to work on macOS, but it looks like it's not an issue of the pull request since this same thing is happening on the other pull requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. Left a few small comments
Another thing I would recommend adding are tests for the aspect ratio |
I saw all the comments and they all seem reasonable. I addressed all the issues you raised, Everything should be correct now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for making the changes.
As I commented on issue #732, I had an idea to calculate the aspect ratio of the figure when using ImageGrid so that there isn't so much white space between subplots when displaying images with uneven aspect ratios.
I implemented it by setting the parameter
aspect
to'auto'
, which triggers a couple of lines of code to calculate it from the dimensions of the image. Since lists of images are also supported, I also made it so it uses the lowest aspect ratio among the images, since it would make them overlap in the figure otherwise.