fixed flatten order=F; cividis default.
This commit is contained in:
parent
661b7fb602
commit
ae2aa096fb
|
@ -683,19 +683,19 @@ class Grid:
|
||||||
|
|
||||||
|
|
||||||
def show(self,
|
def show(self,
|
||||||
colormap: Colormap = Colormap.from_predefined('viridis')) -> None:
|
colormap: Colormap = Colormap.from_predefined('cividis')) -> None:
|
||||||
"""
|
"""
|
||||||
Show on screen.
|
Show on screen.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
colormap : damask.Colormap
|
colormap : damask.Colormap, optional
|
||||||
Colors used to map material IDs.
|
Colors used to map material IDs. Defaults to 'cividis'.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
v = VTK.from_image_data(self.cells,self.size,self.origin) \
|
VTK.from_image_data(self.cells,self.size,self.origin) \
|
||||||
.add(self.material.flatten(),'material')
|
.add(self.material.flatten('F'),'material') \
|
||||||
v.show('material',colormap)
|
.show('material',colormap)
|
||||||
|
|
||||||
|
|
||||||
def add_primitive(self,
|
def add_primitive(self,
|
||||||
|
|
|
@ -470,7 +470,7 @@ class VTK:
|
||||||
|
|
||||||
def show(self,
|
def show(self,
|
||||||
label: str = None,
|
label: str = None,
|
||||||
colormap: Colormap = Colormap.from_predefined('viridis')):
|
colormap: Colormap = Colormap.from_predefined('cividis')):
|
||||||
"""
|
"""
|
||||||
Render.
|
Render.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue