grouped-bar-chart

How to plot grouped bars overlaid with lines

How to plot grouped bars overlaid with lines Question: I am trying to create a chart below created in excel based on the table below using matplotlib.. Category %_total_dist_1 event_rate_%_1 %_total_dist_2 event_rate_%_2 00 (-inf, 0.25) 5.7 36.5 5.8 10 01 [0.25, 4.75) 7 11.2 7 11 02 [4.75, 6.75) 10.5 5 10.5 4.8 03 [6.75, …

Total answers: 2

custom errorbars for catplot with grouped bars in facets

custom errorbars for catplot with grouped bars in facets Question: pandas 1.5.3 seaborn 0.12.2 My code and part of the data is shown below. I am trying to plot the errorbars precomputed in the dataframe (val_lo,val_hi). It seems that sns.catplot with kind=bar has support using errorbar as mentioned here – how do I get that …

Total answers: 1

Adding bar labels shrinks dodged bars in seaborn.objects

Adding bar labels shrinks dodged bars in seaborn.objects Question: I am trying to add text labels to the top of a grouped/dodged bar plot using seaborn.objects. Here is a basic dodged bar plot: import seaborn.objects as so import pandas as pd dat = pd.DataFrame({‘group’:[‘a’,’a’,’b’,’b’], ‘x’:[‘1′,’2′,’1′,’2’], ‘y’:[3,4,1,2]}) (so.Plot(dat, x = ‘x’, y = ‘y’, color = …

Total answers: 1

multi-bar plot of multiple categories

multi-bar plot of multiple categories Question: I have a data frame that basically is a list of Technicians and several categories that have been evaluated in their work (value 1 for passed evaluation, 0 for not passed). Each technician is repeated for every evaluation. in a dictionary form it would be [ {"Name":"A","cat1":1,"cat2":0},{"Name":"A","cat1":1,"cat2":1},{"Name": "B", "cat1":0, …

Total answers: 1

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

How to plot a grouped seaborn barplot from a wide pandas.DataFrame Question: 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 …

Total answers: 2

How to make a grouped bar chart from a Pandas DataFrame

How to make a grouped bar chart from a Pandas DataFrame Question: How can I use pyplot to plot this dataframe: Team Boys Girls 0 Sharks 5 5 1 Lions 3 7 data = {‘Team’: [‘Sharks’, ‘Lions’], ‘Boys’: [5, 5], ‘Girls’: [5, 6] } df = pd.DataFrame(data) so that I can end up with something …

Total answers: 1

Bar chart with bars from two different dataframes

Bar chart with bars from two different dataframes Question: 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’], ‘Qtd_Instrumentation’: [18, 5, 25, 10]}) df_Two = pd.DataFrame({‘Category’: [‘1024Sen’, ‘1024Act’, ‘2089Eng’, ‘2089Sen’], ‘Qtd_Instrumentation’: [14, 1, 22, 10]}) I would like to build …

Total answers: 2

using pandas.DataFrame.melt() with seaborn.barplot

using pandas.DataFrame.melt() with seaborn.barplot Question: So, I have some data in two columns in a Pandas DataFrame: Actual Predicted 0 2.8 2.854729 1 2.2 3.081473 2 4.2 3.211041 3 2.9 2.951905 4 3.4 3.211041 5 3.3 2.838533 6 3.5 3.194845 7 3.1 3.000493 8 2.8 3.016689 9 2.8 3.032885 I want to learn to plot …

Total answers: 1

Making a clustered bar chart

Making a clustered bar chart Question: I have a little pandas dataframe that looks like this: import pandas as pd data = {‘Word’: [‘drink’, ‘cherry’, ‘berry’, ‘plum’, ‘crisp’, ‘spices’], ‘Percentage1’: [18.166654, 13.498262, 9.810123, 7.964429, 7.892941, 0.856775], ‘Percentage2’: [29.014272, 12.802642, 6.775552, 7.105845, 4.715009, 1.663586]} df = pd.DataFrame(data) Word Percentage1 Percentage2 0 drink 18.166654 29.014272 1 cherry …

Total answers: 4

How to create a grouped bar plot

How to create a grouped bar plot Question: The goal here is to create a grouped bar plot, not subplots like the image below Is there a simple way to create a grouped bar plot in Python? Right now I get separate bar plots, instead of separate bars on one plot. import pandas as pd …

Total answers: 4