Questions tagged [catplot]

Questions for seaborn.catplot

80 questions
0
votes
0 answers

Seaborn combining barplot with swarmplot

I'm looking to combine a barplot with a swarmplot in seaborn, when using the "col" feature of a catplot. I am aware that this question was asked before in seaborn overlap swarmplot on barplot, but this solution does not work for me. I want to make…
Robindp
  • 1
  • 1
0
votes
2 answers

How Add Average Values to a Categorical Plot in Python

Trying to add the average value to each category in the plot. I have been trying to add these average values independently, per category, but without success. Is there a way that catplot can average the values from the data set and plot that extra…
0
votes
1 answer

Receiving "ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()." when creating seaborn catplot

I'm trying to create a seaborn catplot. I read a csv datafile which includes data for 600 companies. I create four equal sized categories for the Environment Score column. I use this category as my x-axis variable and P/E-Ratio column is y-axis…
Turisti
  • 1
  • 1
0
votes
1 answer

Seaborn ValueError: Invalid RGBA argument: masked

I'm trying to create a catplot with seaborn. I prepared the data like this PDB_throughput=pd.DataFrame() PDCPlayer_throughputD['Type'] = 'Drone-BS' perfect_throughput['Type'] =…
Zackbord
  • 13
  • 5
0
votes
1 answer

Changing axis label size in Seaborn catplot

I am trying to enlarge the x-axis labels (that is 'onshore', 'offshore', and 'solar'), along with rotating them. But whenever I increase the size, the column sizes of my cat subplots decrease and compress the image. Is there a way to increase the…
pandi20
  • 11
  • 1
  • 5
0
votes
2 answers

seaborn.catplot() hue is not working properly

I am trying to replace a seaborn.facetgrid with a seaborn.catplot. But the seaborn.catplot does not properly label the hue in the Embarked = C facet. dataset: titanic e = sns.FacetGrid(data= train_df, col='Embarked') e.map_dataframe(sns.pointplot,…
0
votes
1 answer

Is there a way to add a line plot on top of all plots within a Catplot grid in Seaborn/Python?

Hello I am very new to using python, I am starting to use it for creating graphs at work (for papers and reports etc). I was just wondering if someone could help with the problem which I have detailed below? I am guessing there is a very simple…
Tom
  • 31
  • 5
0
votes
0 answers

How can I solve Anaconda seaborn library issue?

I am trying to work data visualization. I am using anaconda jupyter lab but always getting the error message. For example, sns.lineplot(x = "timepoint", y = "signal", data = df); AttributeError: module 'seaborn' has no attribute 'lineplot' It is…
syurtekin
  • 25
  • 3
0
votes
0 answers

How to reduce the time it takes to plot this catplot with seaborn

I am trying to plot the Countries life_expect['CountryName'] where the life expectancy life_expect['Value'] is over 80 from a 17001 rows × 6 columns DataFrame . The time it takes to process and plot is over 30 min . What am I doing wrong and how…
Marius.T
  • 25
  • 7
0
votes
1 answer

Formatting catplot - stata

Unfortunately I cannot sent you the dataset due to ethical reasons but I am trying to create a catplot of categorical variables. All the categorical variables are Likert responses. There are 18 of them labelled: psq1 psq2 psq3 psq4 psq5 psq6 psq7…
Epijam
  • 11
  • 2
0
votes
0 answers

Showing values on barplot

The following code generates a pdf file that is fed by a looping barplot over a data frame. My goal is to annotate values over the bars. I have already tried various times to monitor the values but failed. May I get any help on this? Thanks import…
nkltkf
  • 41
  • 6
0
votes
1 answer

How to plot line plot with different colours based on third column? (KeyError:0)

I have a dataframe Company Id ON/OFF Level of Fuel DateTime 2018-08-18 00:00:10 25750275 1 82.048 2018-08-18 00:00:39 25750275 1 82.048 2018-08-18 00:01:09 …
raaj
  • 403
  • 1
  • 5
  • 17
0
votes
1 answer

Set thickness of catplot bars

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,…
HarriS
  • 605
  • 1
  • 6
  • 19
0
votes
1 answer

Seaborn Catplot Violin plotting age distribution in negative integer

I am trying to plot age distribution regarding survived, sex, class variables. from matplotlib import pyplot import seaborn titanic= seaborn.load_dataset("titanic") g = seaborn.catplot(data = titanic, x = 'survived', y = 'age', …
Dohun
  • 477
  • 2
  • 7
  • 13
0
votes
1 answer

How to change the catplot bar positions

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 bars for 'labour'…
Sam
  • 81
  • 2
  • 10