catplot

Place ellipsis on seaborn catplot

Place ellipsis on seaborn catplot Question: I have a seaborn.catplot that looks like this: What I am trying to do is highlight differences in the graph with the following rules: If A-B > 4, color it green If A-B < -1, color it red If A-B = <2= and >=0, color it blue I am …

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 set bar widths equal in catplot with horizontal bars

How to set bar widths equal in catplot with horizontal bars Question: I have a data that I want to present as horizontal bar plots in rows and columns. I’m trying to do this with Python seaborn, which facet facility suits this purpose well. The set of y-axis variables is different on the row dimension, …

Total answers: 1

subplotting with catplot

subplotting with catplot Question: Good morning, I have a small problem with subplotting using bar catplot of seaborn here is a small example to illustrate: import pandas as pd import seaborn as sns import matplotlib.pyplot as plt y = [1.0, 5.5, 2.2, 9.8] x = ["A", "B", "A", "B"] z = ["type1", "type2", "type1", "type2"] …

Total answers: 1

Replace Bool with yes/no in the bar label for catplot of kind='count'

Replace Bool with yes/no in the bar label for catplot of kind='count' Question: I have a graph I made in Seaborn (catplot type=count) and I am trying to make it look a bit nicer by replacing True and False with Yes and No. this is the code so far: g_q1 = sns.catplot(x=’Q1′, kind=’count’, order=[True, False], …

Total answers: 1

Plot stacked barplot with seaborn catplot

Plot stacked barplot with seaborn catplot Question: I wonder is it possible to plot stacked bar plot with seaborn catplot. For example: import seaborn as sns exercise = sns.load_dataset("exercise") plot = exercise.groupby([‘diet’])[‘kind’].value_counts(normalize=True).mul(100).reset_index(name=’percentage%’) g = sns.catplot(x="diet", y="percentage%", hue="kind", data=plot, kind=’bar’) I’d like to stack kind, but it seems catplot doesn’t take ‘stacked’ parameter. Asked By: Osca …

Total answers: 1

Set thickness of catplot bars

Set thickness of catplot bars Question: I want to increase the thickness of the bars in my catplot and also make the y-axis log. Reproducible example: import seaborn as sns df = sns.load_dataset(“titanic”) p = sns.catplot(x=”alive”, hue=”alive”, col=”deck”, data=df, kind=”count”, col_wrap = 4 ) plt.legend(title = ‘alive’,bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.) Asked By: HarriS || Source …

Total answers: 1

How can I add grid lines to a catplot in seaborn?

How can I add grid lines to a catplot in seaborn? Question: How can I add grid lines (vertically and horizontally) to a seaborn catplot? I found a possibility to do that on a boxplot, but I have multiple facets and therefore need a catplot instead. And in contrast to this other answer, catplot does …

Total answers: 3

How to change the catplot bar positions

How to change the catplot bar positions Question: I’m having trouble with the location of the bars on the scale. I understand it to be that some of the hue amounts are 0, so this is throwing off the position of the bars. In the image, the top right plot shows the green and brown …

Total answers: 1

How to use sns.catplot to visualize the change of a dataset

How to use sns.catplot to visualize the change of a dataset Question: I have a dataset that changes mean and variance after time, but still is in the same range of y values. I want visualize the change of the data. Here is the plot with the features I’m looking for: Unfortunately I don’t know …

Total answers: 1