
Interactive Dashboards and Data Apps with Plotly and Dash
By :

Colors are extremely important in conveying and expressing information about our charts. It is also a very big topic, and a full discussion is beyond the scope of this book. We will focus on colors for two types of variables – discrete and continuous. We will also tackle two ways of using colors in our charts: mapping variables to colors, and manually setting our colors.
We start by exploring the differences between the two types of variables.
Simply speaking, continuous variables are the ones that can take an infinite number of possible values in a certain range of numbers. For example, population is a number that can take any value, based on the number of people living in a certain country. Continuous variables are typically numbers (integers or real numbers). Height, weight, and speed are other examples as well.
Discrete variables, on the other hand, are variables that can take the...