Skip to content
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

Feature request: autosize #30

Closed
benman1 opened this issue Jan 31, 2020 · 7 comments · Fixed by #166
Closed

Feature request: autosize #30

benman1 opened this issue Jan 31, 2020 · 7 comments · Fixed by #166
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@benman1
Copy link
Contributor

benman1 commented Jan 31, 2020

It's easy to adjust figsize yourself, and you can pass it to associations(), but it would be nice if this method could estimate an appropriate figsize based on the number of columns.

@shakedzy
Copy link
Owner

shakedzy commented Feb 1, 2020

Cool idea!

@shakedzy shakedzy added the enhancement New feature or request label Feb 1, 2020
@shakedzy shakedzy modified the milestone: Version 0.5.0 Apr 16, 2020
@shakedzy shakedzy added the help wanted Extra attention is needed label Jan 15, 2022
@Swish78
Copy link
Contributor

Swish78 commented Oct 1, 2024

I've implemented a solution to dynamically adjust the heatmap size based on the number of features in the dataset. The figure size scales proportionally, ensuring all features are displayed clearly, regardless of dataset size.

Would you like me to contribute this change to the project? Below are the before and after visuals for your reference:

Before:
image

After:
Screenshot 2024-10-01 at 08 17 47

This resolves the issue of overcrowded plots for larger datasets.

@benman1
Copy link
Contributor Author

benman1 commented Oct 1, 2024

Hey @Swish78! The after screenshot looks great. I think you should go for it and create a PR! @shakedzy what do you say?

@shakedzy
Copy link
Owner

shakedzy commented Oct 2, 2024

hey @Swish78 , i like the simplicity of it 💪 the only caveat here is that it doesn't take into account the length of the numbers displayed in the heat-map. I guess I'm brainstorming here with you - in the (rare?) case where a user wants use fmt=.4f or more figures in the heatmap, numbers will overlap. Is it something worth taking into account?

@Swish78
Copy link
Contributor

Swish78 commented Oct 3, 2024

Hi @shakedzy,

Thanks for your feedback! My initial approach was to consider both the precision of the numbers and the number of features when adjusting the figure size. However, I noticed this led to increased memory consumption, which might not be ideal, especially for larger plots.

That said, I assumed most users typically stick to a .2f format, which is why I leaned toward a simpler feature-based resizing. However, if memory consumption isn't a major concern, we could definitely account for both the number of features and the precision in the figure size configuration.

Let me know your thoughts!

@shakedzy
Copy link
Owner

shakedzy commented Oct 3, 2024

yeah, that makes sense.. I think this solution seems great, i like it, and it's an improvement for the current state anyhow, so i think we'll go with it. Thanks!

@shakedzy shakedzy linked a pull request Oct 3, 2024 that will close this issue
@shakedzy
Copy link
Owner

shakedzy commented Oct 3, 2024

Released in version 0.7.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants