Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Know your problem
Know your data
Visualize your data - pie charts
Work with your chart
14. Color scales
Check yourself


As you can see, ggplot2 automatically chooses colors for each wedge. You don't have to choose them before seeing the chart. After you plot the chart, though, you should always consider whether the automatic colors help you tell your story.

There are three goals for colors and color scales:

  1. To distinguish groups - a qualitative scale,
  2. To highlight variable order - a sequential scale,
  3. To show positive and negative differences from the norm - a diverging scale.

For now, we will focus on palettes that reflect the qualitative scale.

Above we can see an example of a qualitative scale. It's good for distinguishing groups, because:

  • Each color is different, so you can distinguish each square by color alone.
  • No color stands out, so all have equal importance.
  • Each color comes from a different color family, so readers do not expect them to have an automatic order.

These three statements are the key features of every qualitative scale.