-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
A method added to Colormap classes to reverse the colormap #6211
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
Conversation
* method added to both ListedColormap and LinearSegmentedColormap * The parent class Colormap raises NotImplementedError * A test was added to test_colors.py
Looking at the Tracis CI test, I understand the pep8 failure (missing a blank line in the test_colors.py) but the other failure I don't understand. Can someone explain that to me? It seems to be unrelated to what I've done in this PR. |
The other failure is testing against Numpy nightlies, which is known to be broken. It's an optional test, though -- it doesn't cause the whole thing to fail when it fails. |
Cc: @efiring |
Based on a quick look, I think this looks promising. |
""" | ||
Make a reversed instance of the Colormap. | ||
|
||
NOTE: Function not implemented for base class. |
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.
Use .. note ::
and sphinx will render this better.
Can you also add a note in |
* NOTE: cnaged to .. note :: * Raises section removed Colormap.reversed docstring * methods mentioned in a new file under whats_new
@kjartankg Thanks! I think this is your first contribution to mpl, congratulations! Hope we hear from you again. |
Excellent, thanks! I will most likely have a look at some more things. @tacaswell if there's anything specific that needs to be worked on feel free to point me in that direction. Otherwise I will just browse the issues again. |
Browsing the issues / fixing itches you encounter day-to-day is the best place to start. |
This implements a solution for issue #4271
ListedColormap
andLinearSegmentedColormap
Colormap
raisesNotImplementedError
test_colors.py
This PR succeeds PR #5899. Following is the initial comment copy/pasted from the previous PR:
A few things that I ran into while implementing this: