Page 258 - Data Science class 11
P. 258
When you execute the above code, it produces the following result:
7.5.3 stacked Bar chart
The stacked bar chart (aka stacked bar graph) extends the standard bar chart from looking at numeric values across
one categorical variable to two. Each bar in a standard bar chart is divided into a number of sub-bars stacked end to
end, each one corresponding to a level of the second categorical variable.
Stacked Bar Graphs are used to show how a larger category is divided into smaller categories and what the relationship
of each part has on the total amount.
If the goal is to show sizes between individual categories, use a grouped column or bar chart. If the goal is to show
the total size of groups, use a regular stacked bar chart.
Enter the following code snippet in the script panel:
256 Touchpad Data Science-XI

