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

Minor format tweaks #120

Merged
merged 41 commits into from
Feb 2, 2024
Merged

Minor format tweaks #120

merged 41 commits into from
Feb 2, 2024

Conversation

DanielYang59
Copy link
Collaborator

@DanielYang59 DanielYang59 commented Jan 9, 2024

Early PR for adding heatmap to resolve #118.

@DanielYang59
Copy link
Collaborator Author

I notice matplotlib already has the interpolation method built in to allow interpolation of the plot, as stated here, by ax.imshow(grid, interpolation=interp_method, cmap='viridis').

In this case I think this entire code looks pointless, being a simple wrapper over imshow. Therefore I wish to remove this entire function altogether. However the heatmap itself looks good to me (it might not make sense to leave a standalone heatmap tutorial because pymatviz is a visualization package instead of a tutorial for matplotlib?)...Do you have any suggestions @janosh? Thanks.

@janosh
Copy link
Owner

janosh commented Jan 29, 2024

In this case I think this entire code looks pointless, being a simple wrapper over imshow. Therefore I wish to remove this entire function altogether. However the heatmap itself looks good to me (it might not make sense to leave a standalone heatmap tutorial because pymatviz is a visualization package instead of a tutorial for matplotlib?)

yes, that sounds sensible! we can turn this a into an example/docs PR showing people how to use ax.imshow() to make element-matrix heat maps

@DanielYang59 DanielYang59 marked this pull request as draft January 30, 2024 02:55
@DanielYang59 DanielYang59 changed the title Add Heatmap Minor format tweaks Feb 2, 2024
@DanielYang59 DanielYang59 marked this pull request as ready for review February 2, 2024 10:24
@DanielYang59
Copy link
Collaborator Author

@janosh Can you please review this as a minor format tweak and I would open another PR for the periodic table scatter plotter? Thanks!

@DanielYang59 DanielYang59 requested a review from janosh February 2, 2024 10:25
Copy link
Owner

@janosh janosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @DanielYang59! better comments and more tests are always appreciated! 👍

@janosh janosh enabled auto-merge (squash) February 2, 2024 10:45
@DanielYang59
Copy link
Collaborator Author

DanielYang59 commented Feb 2, 2024

Thanks @janosh! I would also add guides and assert generations for ptable_hist in the following PR.

@janosh janosh merged commit a423d4f into janosh:main Feb 2, 2024
7 checks passed
@DanielYang59 DanielYang59 deleted the heatmap branch February 2, 2024 11:46
@DanielYang59
Copy link
Collaborator Author

Meanwhile I pushed the combine_colormap function to upstream CMasher at 1313e/CMasher/pull/122. Hopefully it could get accepted 😁.

@DanielYang59
Copy link
Collaborator Author

Meanwhile I pushed the combine_colormap function to upstream CMasher at 1313e/CMasher/pull/122. Hopefully it could get accepted 😁.

A quick update on this @janosh , after a month's review it finally get merged (really learned a lot about details in coding during this process), and it's now available as, detailed in the manual:

from cmasher import combine_cmaps

cmr.combine_cmaps(cmap_0, cmap_1)

@janosh
Copy link
Owner

janosh commented Feb 22, 2024

nice, glad you found a good home for it! great team work between you and the maintainers on that PR 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] [Self-assigned] Add heatmap plotter
2 participants