Questions tagged [catplot]

Questions for seaborn.catplot

80 questions
2
votes
1 answer

How to create boxplots from a pandas column of strings

I'm trying to plot arrays as boxplot from a dataframe as the second picture here. An extract of my data (I have data over 6 years, 150 per year) : columns : idx | id | mods | Mean(Moyennes) | Median | Values_array | date2021 idx1 | 2021012 | Day |…
sam
  • 47
  • 4
2
votes
1 answer

Place ellipsis on seaborn catplot

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 looking to produce…
artemis
  • 6,857
  • 11
  • 46
  • 99
2
votes
1 answer

How can I add hatching for specific bars in sns.catplot?

I use seaborn to make a categorical barplot of a df containing Pearson correlation R-values for 17 vegetation classes, 3 carbon species and 4 regions. I try to recreate a smaller sample df here: import pandas as pd import seaborn as sns import…
Martina
  • 23
  • 4
2
votes
1 answer

exclude one of the hue from seaborn catplot visualization

I want to visualize category count by seaborn catplot but one of the hue are not important and don't need to include the visualization. How can I select specific Hues at catplot to visualize without changing or removing any value from the column ?
SA_H
  • 35
  • 7
2
votes
1 answer

Show only column value instead of column_name = column value in catplot subplots titles

I'm trying to generate different boxplots that are describing the distribution of a variable for some product families and industry groups ("Production", "Trade", "Business", "Leisure & Wellbeing"). I'd like to know: if there is a way to show only…
2
votes
0 answers

Problem in showing the Data Labels in the Bar Chart of catplot

My code is like the below: import seaborn as sns from itertools import product titanic = sns.load_dataset("titanic") sex_order = titanic['sex'].unique().tolist() hue_order = titanic['survived'].unique().tolist() bar_order = product(sex_order,…
2
votes
2 answers

How to plot multiple dataframes in a single catplot figure

I have multiple data frames consist of three main columns: 1)the categories (c1, c2, c3), one includes the data values, and one includes different time-periods (AA, BB, CC, DD). what I am trying to generate is to generate boxplots of the data for…
Seji
  • 371
  • 1
  • 10
2
votes
0 answers

seaborn catplot subplot not allowed

I want to combine catplot with subplot. But this seems to be impossible: %pylab inline import pandas as pd import seaborn as sns; sns.set() df = pd.DataFrame({'dt': {0: '2020-02-01', 1: '2020-02-01', 2: '2020-02-02', 3: '2020-02-02', 4:…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
2
votes
1 answer

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

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 how to create such a…
Lufr1ed
  • 23
  • 5
2
votes
2 answers

Superimposing Images in Catplot

I am attempting to superimpose dot plots on top of a bar graph. Both types of plots have been generated using seaborn's catplot function. Scatter-plot Code: dotplot2 = sns.catplot(x="Group", y="MASQ_Score", col= "MASQ_Item", units="subject",…
arkadiy
  • 746
  • 1
  • 10
  • 26
2
votes
1 answer

Specify color in catplot

I would like to specify the color of particular observations using seaborn catplot. In a made up exemple: import seaborn as sns import random as…
Nabla
  • 1,509
  • 3
  • 20
  • 35
1
vote
1 answer

How do I prevent a second plot on an axis from rescaling a seaborn FacetGrid?

I am trying to overlay a categorical strip plot on top of a categorical violin plot. I plot the violin plot, and then the strip plot, but the axes are rescaled to the strip plot. I would like to keep the original axes from the violin plots. Here is…
Icy Clench
  • 11
  • 2
1
vote
1 answer

How to enable the top and right spines of a FacetGrid

I tried using sns.set_style("white"), but the spines only cover the bottom and left side. How can I set the spines all around the figure? I also tried plt.subplots_adjust(right=0.1, top=0.1) to see if the spines were just hidden by the size, but I…
Hoskin
  • 11
  • 3
1
vote
1 answer

How to annotate grouped bars in a facetgrid with custom strings

My seaborn plot is shown below. Is there a way to add the info in the flag column (which will always be a single character or empty string) in the center (or top) of the bars? Hoping there is an answer which would not need redoing the plot as…
ironv
  • 978
  • 10
  • 25
1
vote
2 answers

How do I add bar labels in each catplot facet with horizontal bars?

I had Facet Grids and managed to make them horizontal, however after that I have searched for an appropriate code to display the percentages as before but what I found just isn't working as expected. import seaborn as sns import pandas as pd import…