Stacked Bar Chart Overview

Stacked Bar Chart is a Bar Chart with subcategories for each bar.

Let us take an example to explain that with more details. This is the head of data frame, the first ten rows.

Let us see how many rows and features we have in the entire data?

Let us describe each feature (variable/ column)

The first feature is a Single test, let us see how many test we have in the data.

We have twenty one unique Single tests in our data. The next five features represent different stages, each stage consumed specific duration in minutes.

The question here.

Which chart is the appropriate one to display each single test with all its stages?

or in other way.

How can we compare between these stages for all tests in one graph ?

We should reduce the whole data to small data by compute the median or average value for each duration, then we get just one value for each stage in a single test. It means one row for each single test with one value (median / average value) for each stage.

Total observations = Five stages times twenty one tests = 5 x 21 = 105 durations

We computed the average time for each stage then, the data became twenty one indexes and five features.

We set single test feature (variable) as index instead of numbers.

Now we can plot the data in Stacked Bar Chart, one bar for each test with all stages. The total bars will equal total single tests (twenty one bars), each bar with five stages

As we saw in the above figure, we can compare each stage in single test as well as we can compare each stage in a single test with other stage in another test.

We can plot these data with Bar Chart instead of Stacked Bar Chart, let us see the figure.

The above figure Bar Chart is unclear but the figure of stacked Bar Chart is very clear so that, all stages of each single test combined in one bar and became an easy to compare each test with other.

Note:

With few categories for instance, five tests we can plot them in Bar Chart but with several categories more than ten and each category have subcategories as we saw in our data each single test has five stages Stacked Bar Chart was appropriated Chart for comparing between each test or each stages.

--

--

--

A self Learner interested for AI & Python, love reading, write his thoughts to his own way and like presenting knowledge to world in picture which he like.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Data Science meets Python at Booking.com: PyData Amsterdam 2018

My Experience with Flatiron School’s Immersive Data Science Boot Camp

Additive Margin Softmax Loss (AM-Softmax)

Common Machine Learning and Deep Learning Methods for Clinical Text Classification

Analyzing COVID-19 Papers Using Python

**Update: Position filled** Job Announcement: OpenAQ Program Director

Analyzing correlations with Python: Most Correlated Equity Pairs

Random Forests Explained Intuitively

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abdulaziz Alsulami

Abdulaziz Alsulami

A self Learner interested for AI & Python, love reading, write his thoughts to his own way and like presenting knowledge to world in picture which he like.

More from Medium

Rethinking the spreadsheet

Overtaking Trends: The case for 2000bhp F1 cars

How Juniper Networks’ Holistic Approach Bolsters the O-RAN ALLIANCE