seaborn Questions

3

Solved

I have a collection of measured tree diameters and am trying to plot a histogram with a kernel density estimation superimposed on top in python. The seaborn module lets me do this quite simply but ...
Furrier asked 16/2, 2014 at 10:18

6

Solved

For a dataframe import pandas as pd df = pd.DataFrame( {'group': list("AADABCBCCCD"), 'Values': [1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0]}) I am trying to plot a barplot showing percentage of ...
Storebought asked 29/2, 2016 at 5:49

2

Solved

I'm attempting to create a faceted plot using seaborn in python, but I'm having issues with a number of things, one thing being rotating the x-axis labels. I am currently attempting to use the fol...
Occident asked 5/2, 2020 at 13:55

3

Solved

I am trying to create a stacked barplot in seaborn with my dataframe. I have first generated a crosstab table in pandas like so: pd.crosstab(df['Period'], df['Mark']) which returns: Mark False Tr...
Hexapod asked 21/4, 2017 at 14:0

5

I am thrown an error when I am trying to apply searbor pairplot. My full script is easy, and is copied as follows: import seaborn as sns import pandas as pd import numpy as np # Creating a sample ...
Slapdash asked 30/5, 2023 at 12:38

6

Solved

As it's usually advised, I have managed to reduce my problem to a minimal reproducible example: import numpy as np import seaborn as sns import matplotlib.pyplot as plt matrix = np.array([[0.1234,...
Mercantilism asked 23/9, 2023 at 22:19

3

Solved

I am working with the FacetGrid example presented here that results in the plot below. In my data set, there is quite a lot of plots, and it would be convenient to have the x axis labels repeated f...
Eucaine asked 5/9, 2018 at 9:58

10

Solved

I'm plotting two datasets with different units on the y-axis. Is there a way to make the ticks and gridlines aligned on both y-axes? The first image shows what I get, and the second image shows wh...
Tuppeny asked 5/11, 2014 at 8:18

2

Some people find it confusing with whiskers and outliers in a Boxplot. Is it possible to remove those from the Boxplot in Seaborn?
Psychoanalysis asked 1/8, 2019 at 17:53

3

I am new to data analysis. I am currently using seaborn 0.13.1 along with pandas 2.2.0 and I was messing around with the following code: import pandas as pd import seaborn as sns from matplotlib im...
Sheeree asked 25/1 at 19:13

4

I have the following code to dump the dataframe results into a table in HTML, such that the columns in TIME_FRAMES are colored according to a colormap from seaborn. import seaborn as sns TIME_FRA...
Burnell asked 9/4, 2019 at 15:13

2

I was able to visualize my data in a boxplot using Seaborn. sns.boxplot( x=df['Score'].astype('float'), y=df['Group'] ) The visualization shows me: all four quartiles, lower and upper whisker, a...
Fendley asked 24/9, 2018 at 21:4

2

The Matplotlib or Seaborn box plot gives the interquartile range between the 25th percentile and 75th percentile. Is there a way to give custom interquartile range for the Boxplot ? I need to get t...
Tattoo asked 27/2, 2019 at 17:40

3

Solved

Here is the code: fig=plt.figure(figsize=(14,8)) sns.lineplot(x='season', y='team_strikerate', hue='batting_team', data=overall_batseason) plt.legend(title = 'Teams', loc = 1, fontsize = 12) plt.xl...
Callboard asked 14/7, 2020 at 14:31

4

Solved

I've created this plot using Seaborn and a pandas dataframe (data): My code: import seaborn as sns g = sns.lmplot('credibility', 'percentWatched', data=data, hue='millennial', markers=["+&qu...
Resurrection asked 19/7, 2017 at 21:41

4

Solved

I am trying to plot swarm plots and box plots together using matplotlib and Seaborn. I found how to plot them together but the box plot appears underneath the swarm plot. The problem with this is t...
Smidgen asked 18/6, 2017 at 13:59

7

I am trying to plot a histogram using seaborn. When I try to set kde=True this error is returned: ValueError: Multi-dimensional indexing (e.g. obj[:, None]) is no longer supported. Convert to a num...
Given asked 5/4, 2023 at 11:55

2

Solved

I am trying to put the following two plots onto the same figure: import seaborn as sns; sns.set(color_codes=True) import matplotlib.pyplot as plt f, (ax1, ax2) = plt.subplots(1, 2, sharey=True) ir...
Countermine asked 12/8, 2018 at 19:5

11

Solved

I have a scatter plot graph with a bunch of random x, y coordinates. Currently the Y-Axis starts at 0 and goes up to the max value. I would like the Y-Axis to start at the max value and go up to 0....
Quartermaster asked 12/1, 2010 at 19:31

9

Solved

How to plot multiple bars in matplotlib, when I tried to call the bar function multiple times, they overlap and as seen the below figure the highest value red can be seen only. How can I plot the m...
Calif asked 11/1, 2013 at 1:48

6

Solved

import matplotlib.pyplot as plt import matplotlib.ticker as ticker import seaborn as sns import pandas as pd sns.set(style="darkgrid") fig, ax = plt.subplots(figsize=(8, 5)) palette = s...
Kindless asked 12/12, 2018 at 16:25

16

How do I change the size of figure drawn with Matplotlib?
Homograph asked 1/12, 2008 at 21:24

6

Solved

I want a line plot to indicate if a piece of data is missing such as: However, the code below fills the missing data, creating a potentially misleading chart: import pandas as pd import seaborn a...
Pascale asked 30/8, 2018 at 13:40

6

Solved

I'm simply trying to plot a dashed line using seaborn. This is the code I'm using and the output I'm getting import seaborn as sns import numpy as np import matplotlib.pyplot as plt n = 11 x = np...
Neuberger asked 22/8, 2018 at 9:27

3

I'm trying to create a 2D line chart with seaborn, but I get several artefacts as seen here, i.e. lines that suddenly shoot down or up with barely-visible vertical lines: Excel on the other hand ...
Coup asked 4/10, 2019 at 20:38

© 2022 - 2024 — McMap. All rights reserved.