fixed flatten order=F; cividis default.

This commit is contained in:
Philip Eisenlohr 2022-02-22 12:23:29 -05:00
parent 661b7fb602
commit ae2aa096fb
2 changed files with 7 additions and 7 deletions

View File

@ -683,19 +683,19 @@ class Grid:
def show(self,
colormap: Colormap = Colormap.from_predefined('viridis')) -> None:
colormap: Colormap = Colormap.from_predefined('cividis')) -> None:
"""
Show on screen.
Parameters
----------
colormap : damask.Colormap
Colors used to map material IDs.
colormap : damask.Colormap, optional
Colors used to map material IDs. Defaults to 'cividis'.
"""
v = VTK.from_image_data(self.cells,self.size,self.origin) \
.add(self.material.flatten(),'material')
v.show('material',colormap)
VTK.from_image_data(self.cells,self.size,self.origin) \
.add(self.material.flatten('F'),'material') \
.show('material',colormap)
def add_primitive(self,

View File

@ -470,7 +470,7 @@ class VTK:
def show(self,
label: str = None,
colormap: Colormap = Colormap.from_predefined('viridis')):
colormap: Colormap = Colormap.from_predefined('cividis')):
"""
Render.