Changing the Color
00:10 The café owner wants to emphasize his selection of healthy foods in his next marketing campaign, so he categorizes the drinks based on their sugar content and uses a traffic light system to indicate low, medium, or high sugar content for the drinks.
You can add color to the markers in the scatter plot to show the sugar content of each drink. Here, you define the variables
high to be tuples, each containing three values that represent the red, green, and blue color components, in that order.
01:21 Onscreen, you can now see the scatter plot produced by this code. The café owner has already decided to remove the most expensive drink from the menu as this doesn’t sell well and has a high sugar content.
01:43 That’s a question for him to answer now that he knows what the data points to. In the next section of the course, you’ll see how to change the shape of markers, once more increasing the information density on a single plot.
Become a Member to join the conversation.