A grouped bar chart (aka clustered bar chart, multi-series bar chart) plots numeric values for two levels of categorical variables instead of one. Bars are grouped by position for levels of one categorical variable, with color indicating the secondary category level within each group.
Questions tagged [grouped-bar-chart]
138 questions
1
vote
2 answers
bar chart grouped by the sex column
I have a data frame that looks something like this and I want am trying to make two grouped bar charts where one is grouped by sex and it shows the counts for the disease for males and…

blub_9
- 87
- 8
1
vote
1 answer
How to display absolute percentage above grouped bar chart
I want to make a bar chart that has the absolute % on top of each bar.
The variables are all 'string' as below:
survey['What is the highest level of education you have completed?']
0 Undergraduate degree
1 Less than high school
2 …

Yuanyuan Huo
- 13
- 4
1
vote
1 answer
Grouped bar chart by month in Altair
I have a data set with monthly values, and I want to group the bars by month. However, in my current data set the grouped bars either 1) show up in alphabetical order (Apr, Aug, Dec...) which is obviously wrong, or 2) show the entire date-time label…

granadallama
- 47
- 5
1
vote
1 answer
Creating a 24 hour circle barplot for two measurements every two hours
I have a set of measurements of the number of spores counted for every two hour period over the course of 24 hours, one in dark conditions as well as one in light conditions. Total of 12 sampling periods, and 24 measurements.
The closest I've gotten…

Oakley Robertson
- 11
- 1
1
vote
1 answer
Align text and organize bars in Grouped Bar plot
I am trying to plot grouped bar with a line graph on it using seaborn.
So far I have achieved to plt the graph. However, the bars are getting overlapped and also need some help to align the text.
DataFrame:
df_long = pd.DataFrame({
'group': [ 9, 10,…

Dhvani Shah
- 351
- 1
- 7
- 17
1
vote
0 answers
Grouped barplot in ggplot2: based on three variables (group, time, protein)
Maybe someone has run into someissue. I am trying to plot different proteins (e.g., CS, AMPK) in other type points (pre and post), and two different intervention groups (control, treatment). I plot a grouped barplot nicely based on group and time,…

Carmen O
- 43
- 4
1
vote
0 answers
How to create a grouped barchart with labels using python
I am trying to create a grouped bar chart with labels, not with a label box and colored bars. I am trying to do it with matplotlib as follows.
# importing package
import matplotlib.pyplot as plt
import pandas as pd
# create data
df =…
1
vote
2 answers
pandas grouped plot chart groupby
Tried to create grouped bar chart in pandas. Data looks like this
month
companyname
profit
dec
a
20
jan
a
30
feb
a
50
dec
c
80
jan
c
20
feb
c
34
dec
b
20
jan
b
30
feb
b
50
dec
a
20
jan
a
30
feb
a
50
x axis: company…

Jack
- 181
- 10
1
vote
2 answers
Making a grouped bar chart in R
I am trying to produce a grouped bar chart in R and struggled to know how best to configure the data I have as there are a lot of variables.
This is the data set that I am using: This data is showing what number of individuals of each species (of…

Anna D.
- 11
- 3
1
vote
1 answer
I need guidance on how to move the green bar to the left side of the blue bar in the following bar chart
The green bar is overlapping the blue bar. Can someone show me how to move the green bar to
the right of the blue bar? I want the three bars to align.
import matplotlib.pyplot as plt
import numpy as np
N = 9
labels = ['L', 'S', 'S', 'M', 'W', 'W',…

Svein
- 47
- 3
1
vote
1 answer
Make a grouped barplot from count value in ggplot?
Good day everyone, I'm working with a fairly large dataset and am attempting to make a grouped barplot using ggplot2 in R. I'm struggling trying to divide my plot. I want to get the count for each month by the different types of members.
So far this…

Rike
- 21
- 3
1
vote
0 answers
Why is my barplot graph showing up stacked, instead of grouped?
I don't know why my graph is showing up stacking the data, instead of grouping it.
rawdat <- c(4.2, 4.6, 4.1, 3.9, 5.0, 3.9)
m <- matrix(rawdat, nrow = 2, ncol = 3, byrow = F)
rownames(m) <- c(0,1)
colnames(m) <- c("Group 1", "Group 2", "Group…

Sophie McInerney
- 11
- 1
1
vote
2 answers
Creating a mirrored, grouped barplot?
I have attempted adapting from some other solutions for slightly different situations. I am not being able to sort this out.
I would like to build a mirrored barplot comparing chemicals with controls, but with results grouped by chemical…

Scientist
- 1,061
- 2
- 13
- 30
1
vote
0 answers
Display a list of labels in Chart.js
I have a problem with the graphics of CHART.JS
when trying to get my data from python to pass my list of values as labels in my chartjs grouped bar chart , my list of values is considered as one variable , not all variables of the list are…

FERYEL ZAGHDOUDI
- 11
- 1
1
vote
0 answers
How can I change the size of a bar in a grouped bar chart when one group has no data?
I want to create a grouped bar chart with ggplot.
Groups are gender and age groups.
Problem: In age group 1, there are only females and no males, so the bar for that age group covers both genders. I want to change the size of the bar, so that one…

pauschig
- 11
- 1