Questions tagged [grouped-bar-chart]

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.

138 questions
1
vote
1 answer

Adding Percentage Labels to Grouper Bar Chart

I've been having trouble getting this to work successfully all day. Any help that anyone could offer would be immensely appreciated. Essentially, I just need to add the value of each item in the Percentages list above each bar in the grouped bar…
1
vote
1 answer

How do I add within-group percentages as bar labels on a seaborn count plot?

My goal is to create barplots with counts on the y axis and have the bars labelled with the percentage of the group. The code below gets me halfway there - import seaborn as sns from itertools import product titanic =…
The Rookie
  • 877
  • 8
  • 15
1
vote
2 answers

How to produce a multiple group bar chart based on a specific dataframe column

I have a dataframe which has the following data: Age A 5 True 5 True 10 False 15 False 15 True 20 False 25 True How can I make a bar chart plot which has the values of the total number of rows in Age? So for example, 7 as the Y axis and…
1
vote
1 answer

Plotting multi-level/group barplot with seaborn

I am attempting to recreate the barplot here: The code I have so far is: trends = pd.read_csv('January 8-February 7, 2019 - Core Trends Survey - CSV.csv') trends = trends[['sns2a','sns2b','sns2c','sns2d','sns2e']] trends = trends.rename(columns =…
nrach
  • 19
  • 3
1
vote
1 answer

How to create grouped and stacked bars

I have a very huge dataset with a lot of subsidiaries serving three customer groups in various countries, something like this (in reality there are much more subsidiaries and dates): import pandas as pd import matplotlib.pyplot as plt df =…
1
vote
1 answer

How to annotate grouped bar plot with percent by hue/legend group

I want to add percentage on the top of bars according to the hue. That means all the red and blue bars are equal to 100% respectively. I can make the blue bars equal to 100%, but the red bars can't. Which parts should be modified? Imports and Sample…
1
vote
1 answer

grouped bar chart with age range within each group

I have a list of people and their group and age in a table similar to the example below. I would like to draw a grouped bar chart based on age range. Group Age 1 G1 29 2 G2 25 3 G3 55 4 G2 33 5 G1 70 6 G3 80 I tried the…
BeginneR
  • 69
  • 7
1
vote
1 answer

Adding vertical lines to matplotlib grouped barplot

I have a dataframe as below: ORDER TYPE CURRENT_PRICE MAX_PRICE MIN_PRICE 1500 AA 6255 7257 4356 1500 BB 6822 7109 4102 1510 AA 6853 7439 4650 1510 BB …
Pravat
  • 329
  • 2
  • 17
1
vote
2 answers

How to plot a grouped seaborn barplot from a wide pandas.DataFrame

I am new in data visualization. I am practicing Seaborn and I am trying to plot a barplot with this dataframe. I want the chart has 3 bars on each symbol, however, the output has only 1 bar on each symbol. May I know how to fix it? Part of the…
janicewww
  • 323
  • 1
  • 10
1
vote
1 answer

How to create a grouped bar Chart without manipulating the DataFrame

I noticed that one can create grouped bar charts in Altair, by evaluating the column of a DataFrame. My issue is that my data doesn't have each group as a value of an specific column. So, is it possible to use the column name as a group name in…
Julio S.
  • 944
  • 1
  • 12
  • 26
1
vote
2 answers

Bar chart with bars from two different dataframes

I have the following dataframes: import pandas as pd import numpy as np import matplotlib.pyplot as plt df_One = pd.DataFrame({'Category': ['1024Sen', '1024Act', '2089Eng', '2089Sen'], …
Jane Borges
  • 552
  • 5
  • 14
1
vote
1 answer

How to increase the bar width in a grouped bar plot without reducing the gap between groups

I found the following example for a grouped bar plot using matplotlib.pyplot, and have been able to successfully replicate the example which produces the following output: The code for the above plot is: # libraries import numpy as np import…
user2109254
  • 1,709
  • 2
  • 30
  • 49
0
votes
0 answers

How do I create a Grouped Bar Chart Ordering with a determined Match order in QlikSense

Dears -- I have a grouped bar chart with two dimensions -- Region (Group) and product (Bar). In the bar values, I have their profit. I need to sort by Dimension Product (Bar) in a fixed order that I specified using match expression -- Match ([B],…
user1087661
  • 101
  • 1
  • 3
  • 12
0
votes
0 answers

Problem with ordering column in ggplot2 grouped bar chart

I am trying to manually ordinate the columns for this R script ggplot2 Barchart for this locations' order: S. Giorgio, S. Agostino, S.Marinella, Grottini. I tried using the following script with R but the location S.Agostino disappear and the order…
Miriam
  • 11
  • 1
0
votes
1 answer

Is there a way to stack a custom rendered bar within each category so they don't overlap

I have rangebar to visualize date ranges of items within a certain category. The issue is that the bars overlap and I would like them to stack. I tried creating separate series for each issue but it has the same effect as creating one series for all…