

So you should strive not to make plots that are too complex. This makes your plot harder to interpret: rather than focusing on the data, a viewer will have to continually refer to the legend to make sense of what is shown. If you have more than a handful of colors in your plot, it can become difficult to keep in mind what each one means, unless there are pre-existing associations between the categories and the colors used to represent them. With that said, here are few notes of caution. So as a general rule, use hue variation to represent categories. If the categories are equally important, this is a poor representation. And how would we talk about a particular category? “The fairly-but-not-too-blue points?” What’s more, the gray dots seem to fade into the background, de-emphasizing them relative to the more intense blue dots. With the plot on the right, where the points are all blue but vary in their luminance and saturation, it’s harder to say how many unique categories are present. Most people would be able to quickly ascertain that there are five distinct categories in the plot on the left and, if asked to characterize the “blue” points, would be able to do so. It also makes plots easier to talk about. Hue is useful for representing categories: most people can distinguish a moderate number of hues relatively easily, and points that have different hues but similar brightness or intensity seem equally important.

The blue and orange colors differ mostly in terms of their hue. This pop-out effect happens because our visual system prioritizes color differences. In the plot on the right, the orange triangles “pop out”, making it easy to distinguish them from the circles. Consider this simple example: in which of these two plots is it easier to count the number of triangular points? When you want to represent multiple categories in a plot, you typically should vary the color of the elements. Two colors with different hues will look more distinct when they have more saturation:Īnd lightness corresponds to how much light is emitted (or reflected, for printed colors), ranging from black to white: Vary hue to distinguish categories # Saturation (or chroma) is the colorfulness.

It’s property of color that leads to first-order names like “red” and “blue”: Hue is the component that distinguishes “different colors” in a non-technical sense. But for analyzing the perceptual attributes of a color, it’s better to think in terms of hue, saturation, and luminance channels. We usually program colors in a computer by specifying their RGB values, which set the intensity of the red, green, and blue channels in a display. General principles for using color in plots # Components of color #īecause of the way our eyes work, a particular color can be defined using three components. This chapter discusses both the general principles that should guide your choices and the tools in seaborn that help you quickly find the best solution for a given application. Seaborn makes it easy to use colors that are well-suited to the characteristics of your data and your visualization goals.
