Questions tagged [seaborn]

Seaborn is a statistical data visualization library for Python.

Filter by
Sorted by
Tagged with
1
vote
1answer
12 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 ...
11
votes
2answers
80k views
0
votes
0answers
14 views

Which plot should I use for plotting discrete variable with binary variable?

I am two columns Age(discrete), and Purchase(binary). I want to visualize it to understand which age group is most interested in purchasing things. I was thinking of plotting something like a line ...
0
votes
1answer
1k 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: ...
0
votes
1answer
124 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 ...
9
votes
3answers
6k views

Can we remove features that have zero-correlation with the target/label?

So I draw a pairplot/heatmap from the feature correlations of a dataset and see a set of features that bears Zero-correlations both with: every other feature and also with the target/label ....
0
votes
1answer
209 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 ...
0
votes
0answers
116 views

CDF plot overlay histogram in python

I have a dataframe called df['ProgressStep'] I would like to get overlaid CDF plot in histogram. Have tried 2 methods, neither one meet my target perfectly. please help to fine tune the code, either ...
4
votes
2answers
716 views

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

I'm looking at telecom customers data. Two of the variables I'm looking at currently are: Monthly Charges - The total amount charged to the customer monthly. Is Senior Citizen - Whether the customer ...
0
votes
1answer
136 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 ...
1
vote
1answer
75 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 ...
0
votes
0answers
64 views

Stacked Area / Stack Bar Plot with color map based on range of values (Python, Pandas)

I'm trying to create a plot like the one shown in the picture below - where for each x value (a trading period) the y values (Megawatt, MW, see table below) are stacked on top of each other in order ...
0
votes
0answers
287 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 ...
5
votes
1answer
367 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 ...
0
votes
0answers
2k views

How to interpret pairplot?

There are 2 sns.pairplot, tell me how to interpret them. As I understand it, sns.pairplot allows us to look at the diagonal distribution of these signs, and on the non-diagonal linear relationship ...
1
vote
0answers
28 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 ...
9
votes
3answers
33k views

How to remove outliers using box-plot?

I have data of a metric grouped date wise. I have plotted the data, now, how do I remove the values outside the range of the boxplot (outliers)? All the ['AVG'] data is in a single column, I need it ...
16
votes
4answers
33k views

seaborn heatmap not displaying correctly

For some reason, my heatmap is not displaying correctly anymore. It was working just fine even with 6 classes. Since the last time I used it, I've installed many packages (including plotly). I don't ...
4
votes
1answer
5k 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 ...
13
votes
4answers
35k views

Meaning of 'hue" in seaborn barplot

Seaborn barplot has three parameters. x, y, hue : names of variables in data or vector data, optional Question What is hue? It seems the attribute to plot but why it is called "hue" because when ...
0
votes
1answer
198 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 ...
1
vote
1answer
325 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 ...
6
votes
1answer
2k views

How does Seaborn calculate error bars when using estimators other than the arithmetic mean?

If I create a barplot using Seaborn and specify the geometric mean or the median as the estimator, does Seaborn know to use the appropriate standard error formula to create error bars?
3
votes
1answer
9k views

Checking for skewness in data

I have a data frame consisting of some continuous data features. I did a kde plot of the features using seaborn kdeplot functionality which gave me a plot as shown below : How do I interpret this ...
1
vote
1answer
16k 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 ...
1
vote
1answer
235 views

How to better represent three sets of categorical data?

Given three set of data with categorical integer x-axis with the same range (0-10): ...
5
votes
2answers
70 views

Which plot to use for data spanned on multiple years?

I've a dataset of - Number of accidents that happens in each state. The dataset spans from 2001 to 2014. Which plot should I use to represent the information - number of accidents in each state per ...
3
votes
1answer
481 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 ...
5
votes
1answer
8k views

Stacked time series plot in python

In pandas I can set the date as index, and then run df.plot() to see a line chart. How do I make that line chart stacked as in the picture below?
2
votes
1answer
5k views

Bubbleplot with seaborn

Is there someway to create a bubble plot with seaborn? I already know how to do it with Matplot lib, as in this tutorial. ...
3
votes
1answer
592 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'.
4
votes
2answers
320 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 ...
2
votes
1answer
51 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 ...
1
vote
0answers
101 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
3
votes
1answer
296 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 ...
0
votes
0answers
43 views
3
votes
1answer
11k views

How do I change the marker edge color of a seaborn relplot?

I am trying to output a complex facet grid plot in the format of the following image: But the problem is that I don't want the edge color of the markers to be white, I want it to be the face color. ...
1
vote
0answers
719 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 ...
0
votes
2answers
3k views

seaborn regplot does not show the line

Question Why lmplot show the line but regplot does not? lmplot ...
0
votes
0answers
98 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 ...
6
votes
2answers
3k views

Seaborn Violin plot error No loop for unfunc add

I'm trying to plot a violin plot with a split based on Sex ( like in the fourth example in the doccumentation but with Sex) I can produce a categorical scatter plot and split it by Sex. However, when ...
1
vote
0answers
69 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 ...
2
votes
2answers
57 views

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

I have a list like this, ...
4
votes
2answers
478 views

Hierarchical Clustering: Extract observations from large heatmap

I'm currently trying to visualize a large data set as heat map. That in itself works smoothly but I struggle with gaining insights from interestingly looking clusters. Specifically, I have two ...
3
votes
2answers
380 views

Residual plots: why do we want to know the error?

The residual plot represents the error between the actual value. Y-axis: residuals X-axis: the predictor variable or fitted values. Why do we want to know the error, what benefits us in getting the ...
3
votes
1answer
488 views

How to put the variable names of pandas data frame on Diagonal of Seaborn PairGrid?

The given below code is not working now(earlier it was working) to put the column names on the diagonal of Seaborn PairGrid. ...
-1
votes
1answer
113 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 ...
2
votes
1answer
3k views

Seaborn distplot and KDE data confusion

I'm running through a tutorial to understand the histogram plotting. Given the seaborn tips dataset, by running the sns.distplot(tips.tip); function the following ...
1
vote
4answers
12k views

Unable to generate error bars with seaborn

Can you please help me add error bars to my graph? This is the csv: ...
0
votes
1answer
313 views

Why am I getting misaligned values while plotting heatmaps using seaborn?

While plotting heatmaps using seaborn, the numbers are getting printed on the boundary of the heatmap (Please see the image attached). I have already plotted heatmaps many times using the same code. ...