reverse should return DAMASK colormap

This commit is contained in:
Martin Diehl 2020-06-27 16:25:10 +02:00
parent e779e190ea
commit 234699bd18
1 changed files with 5 additions and 0 deletions

View File

@ -123,6 +123,11 @@ class Colormap(mpl.colors.ListedColormap):
elif format.lower() == 'ascii': elif format.lower() == 'ascii':
Colormap._export_ASCII(self,f) Colormap._export_ASCII(self,f)
def reversed(self):
rev = super(Colormap,self).reversed()
return Colormap(rev.colors,rev.name)
@staticmethod @staticmethod
def _export_paraview(colormap,fhandle=None): def _export_paraview(colormap,fhandle=None):