A method added to Colormap classes to reverse the colormap#6211
A method added to Colormap classes to reverse the colormap#6211tacaswell merged 3 commits intomatplotlib:masterfrom
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. |
lib/matplotlib/colors.py
Outdated
| """ | ||
| Make a reversed instance of the Colormap. | ||
|
|
||
| NOTE: Function not implemented for base class. |
There was a problem hiding this comment.
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
ListedColormapandLinearSegmentedColormapColormapraisesNotImplementedErrortest_colors.pyThis 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: