New Viridis palette?

Hi !

In the PR #1491, i created the Tableau palette, which provides new default colors for OT:

These colors are taken from Matplotlib and provide colors which look better for many of us (but not all!).

This does the job for most plots based on curves and lines, but does not provides the colors we need for 2D, flat, plots, e.g. the isovalues of a function. Here is an example of a contour plot from a kriging metamodel, based on Matplotlib’s pcolor function:


that i created for:

For this purpose, I plan to provide the Viridis colormap, based on a suggestion from Julien Schueller. This sounds an excellent option, because this particular colormap has special properties for users with color blindness (see e.g.

  • Does this sounds a good idea for your applications ?
  • I cannot find an OpenTURNS example within the doc (i.e. in that would benefit from this colormap. Do you?

Best regards,


I found that the current use-cases are related to the PolygonArray class, which is used to plot a Mesh or draw the marginal of a Field:

The only example of this is in:

That is a great idea. I think it would be useful for plotting the prediction of surrogate models (polynomial chaos, Kriging) when there are 2 input dimensions. No such example exists yet, but its creation (at least for Kriging) is planned.

While we are on this topic, we may opt for the “cividis” colormap, which has better visual properties than viridis. On the figure below, Viridis is on the left, and Cividis on the right.

To quote the paper :

A downside of cividis, as reported by colleagues, is its minimal coverage of different colors:varying straight from blue to yellow rather than cycling through other colors, as viridis does.This keeps cividis from being as aesthetically pleasing as viridis. Of course, this is because those who have a form of CVD cannot see these colors the way those with normal vision can.However, since normal color vision is more common, using more colors is often desired for representation of data and for increasing visual perception precision through use of a larger dynamic color range.