Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [seaborn]

Seaborn is a statistical data visualization library for Python.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Plotting related multiple plots sharing an axis but each disjoint from each other

I want to plot related multiple plots sharing an axis but each disjoint from each other, i.e., same x-axis feature and scale but each of the other features has their own separate y-axis region with it'...
Snape's user avatar
  • 1
0 votes
0 answers
32 views

Why do seaborn.histplot and pyplot.hist generate two different histograms on the same data?

I'm trying to visualize a customer data, two of the variables I'm looking at are verified_status and video_transcription_length. ...
user161913's user avatar
0 votes
0 answers
39 views

Quantifying heat map data

I have heatmap data (the x and y axis take in angles as inputs, and the color of that particular spot on the grid represents the "divergence.") I am unsure on how to numerically describe my ...
MaximeJaccon's user avatar
0 votes
1 answer
53 views

Seaborn distplot and countplot displaying incorrect y-axis

I have a simple dataset created using NLTK's FreqDist function, and have successfully converted the distribution to a pandas dataframe. When visualizing that dataframe using seaborn, I get a weird ...
NotHead's user avatar
0 votes
0 answers
74 views

How does Seaborn's histplot determine the bins' width?

I don't understand how Seaborn histplot's binwidth parameter works when the range is not an integer multiple of the bin width. ...
Evan Aad's user avatar
  • 175
2 votes
1 answer
99 views

How to change the method of quartile computation that Seaborn uses to draw boxplots?

Suppose df is a variable assigned a pandas DataFrame object, whose collection of numeric columns includes one that is titled <...
Evan Aad's user avatar
  • 175
1 vote
1 answer
65 views

How to interpret Seaborn's regplot() when using x_bins?

I'm walking through a course on Seaborn and I'm having trouble understanding how exactly the x_bins parameter in Seaborn's ...
WorldGov's user avatar
  • 133
1 vote
2 answers
607 views

What is the most professional color palette for Seaborn boxplots?

I am working on a project and I'm visualizing results using Seaborn boxplots. In academic papers, it seems the most professional color palette is gray. But in presentations and in cases where you want ...
m13op22's user avatar
  • 382
1 vote
1 answer
314 views

What is the difference between kdeplot's "cut" and "clip" parameters?

In Seaborn's kdeplot, is there a semantic difference between the cut and the clip parameters?...
Evan Aad's user avatar
  • 175
0 votes
0 answers
9 views

What do the areas under the graphs in a `kdeplot` mean when several graphs are drawn simultaneously from the same dataframe?

Suppose I have a dataframe documenting the offering prices in USD of a certain product in a certain market at a certain time. The product is manufactured by one of two manufacturers: ...
Evan Aad's user avatar
  • 175
0 votes
0 answers
17 views

Visualizing three parameters dataset, in which parameters are sub-group of one another

I am trying to represent air quality for zones within a city. Initially, based on various factors zones were classified into four exposure categories (1,2,3,4).Those four categories were further sub-...
joseph_k's user avatar
  • 101
0 votes
2 answers
22 views

Unfamiliar aspect on box plot

I am learning python and I am practicing with a project using a dataset. I created a box plot using seaborn's catplot only using the arguments data,x,y,and kind. There is something on the box plot (...
notsimplelogic's user avatar
1 vote
3 answers
231 views

Heatmap not respecting the color bounds

For the following dataframe of a chi2 correlation study, i started to plot a heatmap: ...
Guilherme Raibolt's user avatar
0 votes
0 answers
26 views

Varying the axes of a seaborn displot to save space

I used the code below to generate the image attached to this question: ...
Zorgoth's user avatar
  • 133
0 votes
0 answers
329 views

Seaborn displot with labels on every set of axes?

I used the code below to create the image attached to this question. There are a couple things I don't like about the result. One is that it consumes a huge amount of vertical space, all because a ...
Zorgoth's user avatar
  • 133
0 votes
2 answers
976 views

Why does seaborn plot my boxplots like this?

I'm doing a project on outlier detection, and as one of the methods for gaining an understanding of my dataset I'm using boxplots to visualize how the data points lie in regard to all the data points ...
Oliver Michaelsen's user avatar
0 votes
1 answer
345 views

Visualizing dataset class distribution in pytorch

I have used in the past a seaborn plotting function to visualize the number of samples belonging to each class directory. That was very easy since each directory in which the dataset was divided ...
roberto bruzzese's user avatar
0 votes
0 answers
63 views

Distribution check - different results using plt.hist and seaborn.displot

I have an apparently very simple task: checking the distribution of values contained in an array data. Only thing is, I get two completely different results by ...
sato's user avatar
  • 101
0 votes
0 answers
777 views

AttributeError: 'str' object has no attribute 'get'

how to solve 'str' object has no attribute 'get' error while trying to execute this code: sns.countplot(x='Survived', data='train') I have already successfully imported seaborn as sns and read the ...
Samuel Ahiadjipé's user avatar
0 votes
1 answer
15k views

ValueError: Could not interpret value `female_height` for parameter `x` when trying to plot certain rows

I have a big dataframe that consists of male and female shoe sizes. I am currently trying to plot size versus height for male and female separately. I have tried to slice the data and stored it in ...
royalTiger's user avatar
0 votes
1 answer
1k views

Adding another 'hue' to a pairplot

I have plotted a pairplot in Seaborn with a hue, similar to the one shown below. I would like to add another hue by changing the shape of the markers based on another categorical feature. E.g., the ...
Hector's user avatar
  • 1
1 vote
1 answer
37 views

Interpreting visualisations for write ups - clustermaps

I produced a clustermap as part of an attempt to visualise any multicollinearity in a dataset and it's occurred to me that I actually don't really know how to interpret it. There is plenty of ...
Vintagefiretruk's user avatar
0 votes
1 answer
363 views

Seaborn Heatmap with month & hour of database entry

I have a dataframe with X rows. For each row, I have the information of the month (value from 1 to 12) and hour (value from 1 to 24) in separate columns I need to create a heatmap with seaborn in ...
vib's user avatar
  • 103
1 vote
0 answers
122 views

Plot polar coordinates (2D) on a Poincáre Sphere surface as either heat map or scatter plot [closed]

I have a dataset with 4 values - amplitude, psi angle, chi angle and class (color). The psi angle and chi angle represent unique points on a . I want plot these psi and chi values on this sphere co-...
Tarun Maganti's user avatar
1 vote
1 answer
5k views

How can I remove legend from the figure in seaborn?

Here is my diagrams, I want to remove the labels of the second bar that is C1,C2,C3,C4,C5, because it is repeating.
Tariq Hussain's user avatar
1 vote
1 answer
28 views

Changing the predicted variable from price to price/km due to better visual correlation

I'm working on a dataset of Uber Rides from Kaggle. Of the important variables there are pickup and drop-off coordinates, passenger count, datetime of pickup, distance and the final price. I'm ...
mikemykhaylov's user avatar
0 votes
1 answer
3k views

Plot NaNs as a category seaborn countplot

I have a column in my dataframe which has 'True' as a value and all other values are NaNs (so there are no 'false' values). I want to plot a countplot for the said data in seaborn but want to include ...
ml_learner15's user avatar
1 vote
1 answer
355 views

Types Of Plots for Discrete Data

So I have a lot of discrete variables in my dataset and want to visualize them (univariate for now). I went through various articles over the internet and it is suggested that histograms and count ...
ml_learner15's user avatar
0 votes
0 answers
1k views

seaborn heatmap - x axis - repeated values

I'm in trouble creating a heatmap using a CSV file. csv data is in a format like below here is a code ...
Hello-experts's user avatar
1 vote
0 answers
32 views

Distplot 'a' parameter, does not make logical sense to me, can anyone explain?

Most sns plot parameters have names that make somewhat logical sense, For example scatterplot has the x attribute to choose what to plot on the x-axis, and y for y-axis. Similarly kdeplot uses the ...
ashtavakra's user avatar
0 votes
1 answer
4k views

Python: How to plot time interval from a Dataframe in Pandas

I have the a dataframe(df) which has the data of a Job being executed at different time intervals. It includes the following details about the execution of a job: ...
Subhawna's user avatar
5 votes
2 answers
30k views

Plot Two Categorical Variables

How to plot two categorical variables in Python or using any library? I want to plot the Playing Role of a Cricketer (Batsman, Bowler, etc.) VS Bought_By (Franchise Names, e.g., CSK, DC, etc.). The ...
Pradeep Singh's user avatar
1 vote
1 answer
2k views

Why the Silhouette Score and optimal number of Cluster changes when using 2D and 3D data?

I am experimenting with Kmeans clustering. My data (vectors) was in 300 dimensions which I am converting into 2D and 3D using PCA. Now, to find the optimal number of clusters, I used the Silhouette ...
Piyush Ghasiya's user avatar
2 votes
1 answer
28k views

how to create multiple subplots( scatterplot) in for loop

I want to create scatterplot of target variable with all the other variables in dataframe. Just like we create pairplot but as pairplot with large number of variables will take lot of time and ...
Strange119's user avatar
0 votes
1 answer
444 views

How to add Error Bar to Matplotlib line plot?

I have the following dataset which I use to plot a line plot. The plot is obtained as the mean of values obtained from the data. I want to add error bars to this ...
Ishan Dutta's user avatar
2 votes
1 answer
174 views

What is the most straightforward way to visualize color-coded clusters along with the cluster centers?

I have applied the kMeans Clustering algorithm to a dataframe and have gained cluster labels for each row. I had selected only two features. There are 4 clusters. I want to visualize the datapoints in ...
truth's user avatar
  • 280
1 vote
0 answers
156 views

Generating a Confusion Matrix from a Seaborn Heatmap

Is there a way I can reverse engineer a Seaborn heatmap saved as .png? I want to get the array of values out of it. Does the library provide a "load-from-image" facility, or is there any sta
Andrei-Cristian Rad's user avatar
3 votes
1 answer
1k views

Find non overlapping area between two kde plots in python

I was attempting to determine whether a feature is important or not base on its kde distribution for target variable. I am aware how to plot the kde plot and guess after looking at the plots, but is ...
BhishanPoudel's user avatar
0 votes
0 answers
65 views

How may I may fit the cluster number while it is going to the outside of the X-axis and when visualizing clusters in two dimensions?

I am writing code for DBSCAN clustering. I find the eps value which is 0.12 with the help of ...
As if's user avatar
  • 1
3 votes
1 answer
592 views

Seaborn Pairplot not showin colors of the labels

My dataframe looks similar to this I am using the following line to graph the pairplot sns.pairplot(iris, hue = 'States', height=7, aspect=0.8 ) The graph is ...
E199504's user avatar
  • 605
4 votes
2 answers
851 views

Seaborn Scatter plot

I have a dataset containing of only one column, using matplotlib I was able to do the scatter plot the following way ...
E199504's user avatar
  • 605
0 votes
1 answer
586 views

Vertical lines of overlapping points in Seaborn Swarmplot

When I plot my data to see its distribution via Swarmplot, these two vertical lines that seems to even overlap occur in the figure. It seems to occur even around values that are not that dense, such ...
meliksahturker's user avatar
1 vote
0 answers
1k views

Finding multiple histogram graphs with Seaborn

When graphing with matplotlib I get this 4 histograms model: 4 Histograms Using Seaborn I am getting the exact graph I need but I cannot replicate it to get 4 at a time: I want to get 4 of the ...
The Dan's user avatar
  • 193
0 votes
1 answer
398 views

What does the term 'Facet' in Seaborn FacetGrid imply?

I am a newbie to data science. I have a very basic understanding of Seaborn. My understanding is that it is used to plot grids. That said, I intend to have a better understanding of 'FacetGrid' and ...
Bipin's user avatar
  • 213
5 votes
1 answer
2k views

Plotting an empty bin in a Seaborn histogram

I'm going through this YouTube series on simulation by The Coding Train. I'm trying to graph some filtered random numbers, but seaborn is leaving an odd gap in the very middle of the histogram. My ...
JDG's user avatar
  • 151
0 votes
0 answers
258 views

Opposite results using statsmodels and seaborn regplot

I use regplot using the following code: sns.regplot(x = "Year", y = "Data_Value", data = NOAA_TMAX_s ); and I obtain the following figure: showing clearly that ...
Hermes Morales's user avatar
1 vote
0 answers
126 views

Plotting heatmap seaborn dilemma

First i want to tell you that i'm trying to create a model in the right steps, which needs data exploration, data preprocessing (AFTER splitting the data into train/test), etc. For the part of data ...
random student's user avatar
3 votes
2 answers
163 views

How can I find to starting point of skewed data in python?

I have a list like this, ...
E. Zeytinci's user avatar
-1 votes
1 answer
238 views

Meaning of 'hue" in seaborn [closed]

I know what "hue" does a little I'm studying kaggle and the image is about bike sharing demand analysis What I want to know is shouldn't the second images's sum of each point's y axis be the first ...
흐음흐음's user avatar
6 votes
1 answer
1k views

What does 'lm' mean in the lmplot() in seaborn?

I was learning seaborn, but could not find the full name of seaborn.lmplot. What is 'l' and 'm' in the name 'lmplot'.
Shayekh Bin Islam's user avatar