Skip to content

Commit

Permalink
Default cmap 'jet' -> 'viridis' (#106)
Browse files Browse the repository at this point in the history
In the absence of any input on the topic in 6 months I have changed the
default to viridis in the commit. It is trivial to change to something
else if wanted, but that can be discussed in this (or a future) PR if anyone feels
strongly about it.
  • Loading branch information
jgd10 authored Jan 28, 2022
1 parent 91885fa commit 8a0ae28
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ansys/mapdl/reader/cyclic_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ def _plot_cyclic_point_scalars(self, scalars, rnum,
full_screen = kwargs.pop('full_screen', False)
screenshot = kwargs.pop('screenshot', None)
text_color = kwargs.pop('text_color', None)
kwargs.setdefault('cmap', 'jet')
kwargs.setdefault('cmap', 'viridis')
if scalars is not None:
kwargs.setdefault('rng', [np.nanmin(scalars), np.nanmax(scalars)])

Expand Down
2 changes: 1 addition & 1 deletion ansys/mapdl/reader/examples/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def solve_km():
# add two meshes to the plotting class
pl.add_mesh(grid.copy(), color='w', style='wireframe')
pl.add_mesh(grid, scalars=n, stitle='Normalized\nDisplacement',
flip_scalars=True, cmap='jet')
flip_scalars=True, cmap='viridis')
# Update the coordinates by adding the mode shape to the grid
pl.update_coordinates(grid.points + disp / 80, render=False)
pl.add_text('Cantliver Beam 4th\nMode Shape at\n{:.4f}'.format(f[3]),
Expand Down
2 changes: 1 addition & 1 deletion ansys/mapdl/reader/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _configure_pyvista():
"""Configure PyVista's ``rcParams`` for pyansys"""
import pyvista as pv
# pv.global_theme.interactive = True
pv.global_theme.cmap = "jet"
pv.global_theme.cmap = "viridis"
pv.global_theme.font.family = "courier"
pv.global_theme.title = "PyMAPDL-Reader"

Expand Down
4 changes: 2 additions & 2 deletions ansys/mapdl/reader/rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -2741,7 +2741,7 @@ def _plot_point_scalars(self, scalars, rnum=None, grid=None,
rng = kwargs.pop('rng', None)

return_cpos = kwargs.pop('return_cpos', False)
cmap = kwargs.pop('cmap', 'jet')
cmap = kwargs.pop('cmap', 'viridis')
window_size = kwargs.get('window_size')
full_screen = kwargs.get('full_screen')
notebook = kwargs.get('notebook')
Expand Down Expand Up @@ -2961,7 +2961,7 @@ def _animate_point_scalars(self, scalars, grid=None,
scalars[i] = scalars[i][ind]

rng = kwargs.pop('rng', [np.min(scalars), np.max(scalars)])
cmap = kwargs.pop('cmap', 'jet')
cmap = kwargs.pop('cmap', 'viridis')
window_size = kwargs.pop('window_size', [1024, 768])
full_screen = kwargs.pop('full_screen', False)
notebook = kwargs.pop('notebook', False)
Expand Down

0 comments on commit 8a0ae28

Please sign in to comment.