8000 Get cmap from mpl.pyplot by rafmudaf · Pull Request #42 · laserson/squarify · GitHub
[go: up one dir, main page]

Skip to content

Get cmap from mpl.pyplot #42

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

Merged
merged 1 commit into from
Mar 29, 2025
Merged

Get cmap from mpl.pyplot #42

merged 1 commit into from
Mar 29, 2025

Conversation

rafmudaf
Copy link
Contributor

This pull request updates the plot() function to get the color map from matplotlib.pyplot instead of the matplotlib.cm module.

There's an odd story for get_cmap. It was marked deprecated in the matplotlib v3.6 docs. The v3.7 docs say it was deprecated since that version. Then, it was removed in v3.9 and subsequently added back in v3.9.1. I just unfortunately happened to have been using v3.9.0 when I went down this rabbit hole. See matplotlib/matplotlib#28349.

In the end, this is probably a low value change, but the latest docs still have it deprecated so maybe it's future proofing. FWIW this was the intent of #41 as well. @laserson take it or leave it as you please, I'll update my matplotlib version anyway.

Thanks for your great work!

Deprecated and then removed in matplotlib.cm; See matplotlib/matplotlib#28349
rafmudaf added a commit to gbarter/WETOStack that referenced this pull request Mar 28, 2025
matplotlib v3.9.0 is incompatible with squarify, so require >= 3.9.1 (see laserson/squarify#42)
squarify is also listed in docs/requirements.txt
@laserson
Copy link
Owner

Sounds good to me, thanks for the contribution!

@laserson laserson merged commit b3d1d0d into laserson:master Mar 29, 2025
5 checks passed
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.

2 participants
0