added __iadd__ method
This commit is contained in:
parent
3b72d0ec72
commit
f3ff2e7412
|
@ -24,6 +24,11 @@ class Colormap(mpl.colors.ListedColormap):
|
||||||
return Colormap(np.vstack((self.colors,other.colors)),
|
return Colormap(np.vstack((self.colors,other.colors)),
|
||||||
f'{self.name}+{other.name}')
|
f'{self.name}+{other.name}')
|
||||||
|
|
||||||
|
def __iadd__(self,other):
|
||||||
|
"""Concatenate colormaps."""
|
||||||
|
return Colormap(np.vstack((self.colors,other.colors)),
|
||||||
|
f'{self.name}+{other.name}')
|
||||||
|
|
||||||
def __invert__(self):
|
def __invert__(self):
|
||||||
"""Return inverted colormap."""
|
"""Return inverted colormap."""
|
||||||
return self.reversed()
|
return self.reversed()
|
||||||
|
|
Loading…
Reference in New Issue