Get cmap from mpl.pyplot #42
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the
plot()
function to get the color map from matplotlib.pyplot instead of thematplotlib.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!