#197 Available color palettes with Matplotlib

The post #196 describes how to pick up a single color when working with python and matplotlib. This post aims to describe a few color palette that are provided, and thus make your life easier when plotting several color. There are 3 types of color palettes: Sequential, Discrete and Diverging. Here are a few explanations for each:

A sequential color palette allows to describe a graduation. It goes from one bright colot to its dark form, from white to purple for example. In this case, the higher the value of X is, the darker is the colour. Find below a list of sequential palette. Note that you can easily reverse the palette just adding ‘_r‘ at the end of its name!

A diverging color palette is slightly different from a sequential color palette, even if it is used to show a graduation as well. It uses a first color graduation from the minimum to a critical midpoint (orange until 0 in our example), and then use another color to go to the maximum (purple in our example). Well a picture speaks better than thousand of words:

A discrete color palette is used to represent, well, a discrete or categorical variable! For example, if you have 3 groups in the same scatterplot, you probably want to represent them with different colors. Using a palette helps you with your choice: it provides colors that go well together, that are distincts, and color blind friendly!