use a Matplotlib, Colorcet, cmocean, or custom colormap when plotting scalar values.
Choosing Colormaps in Matplotlib — Matplotlib 3.9.2 documentation
User Guide — colorcet v3.1.0 (holoviz.org)
Beautiful colormaps for oceanography: cmocean — cmocean 0.02 documentation (matplotlib.org)
One of the pyvista creator is a geologist, which explains the last option, all the keywords can be used to pass to cmap. The topic that which one will give a better appearance falls on the realm of art.
import pyvista as pv
import numpy as np
points = np.random.random((1000, 3))
pointCloud = pv.PolyData(points)
# scalar is the the z value
pointCloud .plot(scalars=points[:, 2], point_size=5.0, cmap='jet')
Jet colormap
default colormap
Personally, I use default most of time, jet seems to have a better contrast.
clim = [min, max] is another parameter I tweak to improve data visualization.
import pyvista as pv
from pyvista import examples
mesh = examples.load_random_hills()
p = pv.Plotter()
p.add_mesh(mesh,scalars="Elevation",cmap="terrain",clim=[0,10])
p.show()
use help(p.add_mesh) for quick cmap reference and other available display options.