# Questions tagged [seaborn]

Seaborn is a statistical data visualization library for Python.

86 questions
Filter by
Sorted by
Tagged with
9 views

### Plot six variables

I would like to plot a landscape spanned by six variables. The numerical target variable is explained by five numerical variables. Ultimately, it is about to get a visual impression for optima and the ...
1 vote
12 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-...
24 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.
21 views

### Attribute Error seaborn pairplot ticklabel rotation

I'm trying to generate a seaborn pairplot with the ticklabels roatated. My code is here: ...
20 views

### How to plot rate distributions from a binary target

I'm trying to do EDA on a dataset and I have found some visualizations someone else was able to produce but I can't seem to figure out how they did it. The dataset looks roughly like this: default ...
1 vote
15 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 ...
17 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 ...
203 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 ...
385 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
98 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 ...
79 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 ...
439 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 ...
1 vote
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 ...
2k 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: ...
9k 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 ...
1 vote
439 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 ...
19k 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 ...
174 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 ...
62 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
111 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
556 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 ...
48 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 ...
328 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 ...
401 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 ...
239 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 ...
1 vote
753 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 ...
228 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 ...
485 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 ...
117 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 ...
1 vote
77 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 ...
69 views

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

I have a list like this, ...
125 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 ...
709 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'.
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 ...
329 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. ...
47 views

### How should I improve my Vectorized Gradient descent linear regression model?

I wrote a vectorized Gradient descent implementation of the linear regression model. The Dataset looks something like: It's Not Working properly as I am getting negative R Squared error I don't ...
3k 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
744 views

### Two different results from seaborn and matplotlib for a kde plot. What's the reason?

I'm plotting kde plots for a set of data with seaborn and scipy.stats.gaussian_kde: My understanding is that under the hood, seaborn uses scipy (see here). It also seems as though the bandwidth ...
585 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 ...
646 views

### Best way to visualize huge amount of data

I have a data set of around 3M row. I has only 2 category (category- 2:1 ratio). Now i want to visualize(scatter plot) it's distribution to understand can the data linearly separable or not(In order ...
1 vote
1k views

### How to create correlation matrix but with only part of the rows?

I would like to have correlation matrix like this one, but with only 3 bottom rows but all the columns. How can I generate it? ...
362 views

### Plotting facetgrid in subplot for IRIS dataset

I'm trying to plot 6 selected pair subplots with the combination of facetgrid of seaborn and scatter plot from matplotlib. I'm getting plot, but subplots remains empty whereas facetgrid gets plotted ...
501 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. ...
36k 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 ...
12k 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. ...
940 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 ...
303 views

### How to barplot output of pandas.describe() from multiple datasets

I'm trying to compare the differences and similarities between 10 dataframes. I have decided to df.describe() each dataframe in turn and accumulate the results into a new dataframe. ...
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 ...