[feature] Set colorbar limits and colormap in PyVista 3D views
Summary
Add an option to control the colorbar limits and colormap (i.e. colors used in the visualization) to improve visualizations and make comparisons easier.
Current behavior
The colorbar is automatically computed based on :
clim=[spatialized_variable.min(), spatialized_variable.max()]
Desired behavior
We should add an option to set the colorbar limits as fixed values, because in many cases it makes comparisons easier to the eye.
Ex. :
- [0, 1] interval
- fixed interval to compare irradiance values or crop yield values
Add parameters :
-
clim = None (defaults to None, if None the limits are adjusted automatically on min and max values ; else we provide a list of two values : min and max) -
(optional): decide on a default colormap (see this reference) -
cmap = None (defaults to None, then it is the default colormap of PyVista = Viridis ; else we should provide a recognized PyVista colormap)
Sources
https://www.kennethmoreland.com/color-advice/
Linked features or branches
Edited by Bouvry Arnaud