Use a sequential color scale for the ordinal variable.
If you want to add color to the elements that encode the ordinal (ordering) variable, you should use a sequential color scale. It doesn't matter if this is a numerical or categorical value. In this case, the color scale should help the reader immediately sort values from lowest to highest.
In our example, the sequential scale will not only highlight that levels of consumption represent ordered categories, it will also help readers see the trend in the data. It's immediately clear that a high level of consumption (the darkest shade) increases its percentage share as the wealth category increases.
In ggplot2, you can access C. Brewer's sequential scales by using this command:
+ scale_fill_brewer(type = "seq", palette = palette_name )
type argument sets the type of color scale (here, sequential). The
palette argument sets the name of the palette. You can use the Color card to see all available sequential palettes. It's located in the right navigation tab. Take a look at the color palettes before doing the next exercise.