Questions tagged [pairplot]

Plot pairwise relationships in a dataset using seaborn.pairplot

37 questions
18
votes
1 answer

Compare 1 independent vs many dependent variables using seaborn pairplot in an horizontal plot

The pairplot function from seaborn allows to plot pairwise relationships in a dataset. According to the documentation (highlight added): By default, this function will create a grid of Axes such that each variable in data will by shared in the…
mgab
  • 3,147
  • 4
  • 19
  • 30
17
votes
3 answers

Show correlation values in pairplot

I have the below data: prop_tenure prop_12m prop_6m 0.00 0.00 0.00 0.00 0.00 0.00 0.06 0.06 0.10 0.38 0.38 0.25 0.61 0.61 0.66 0.01 0.01 0.02 0.10 …
Shuvayan Das
  • 1,198
  • 3
  • 20
  • 40
8
votes
2 answers

How to annotate seaborn pairplots

I have a collection of binned data from which I generate a series of seaborn pairplots. Since all of the bins have the same labels, but not bin names, I need to annotate the pairplots with the bin name 'n' below so that I can later associate them…
EBo
  • 355
  • 1
  • 3
  • 17
7
votes
1 answer

How to change the z-order of the plot elements in a seaborn pairplot

Here is a snippet, to reproduce my example image: import pandas as pd import numpy as np import seaborn as sns np.random.seed(42) df = pd.DataFrame(np.random.rand(10,2), columns=['x', 'y']) df['label'] = ['cat', 'mouse', 'dog', 'mouse', 'cat',…
3
votes
1 answer

Seaborn pairplot() error, OptionError: "No such keys(s): 'mode.use_inf_as_null'", any idea?

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 DataFrame data = { 'A': np.random.randn(100), …
yts61
  • 1,142
  • 2
  • 20
  • 33
3
votes
1 answer

Seaborn pairplot with log scale only for specific columns

I have a dataframe and I'm using seaborn pairplot to plot one target column vs the rest of the columns. Code is below, import seaborn as sns import matplotlib.pyplot as plt tgt_var = 'AB' var_lst = ['A','GH','DL','GT','MS'] pp =…
3
votes
1 answer

How to change the number of bins in seaborn's pairplot() function?

I have a data set of 36000 rows and 51 columns. Each row is an observation and the first 50 columns are 50 different features of each observation. The 51th columns is one with values 0 or 1, where 0 means that the observation belongs to class A and…
thenac
  • 295
  • 6
  • 14
3
votes
2 answers

seaborn.pairplot() changing the color of each graph

I am trying to produce a simple pairplot with each graph with a separate color. I don't know if this is possible as I am not using hue. My dataset is as such: High Jump Discus Throw Long Jump 0 859 732 1061 1 …
geds133
  • 1,503
  • 5
  • 20
  • 52
3
votes
2 answers

How to get a stacked histogram in PairGrid or pairplot

I whish to reproduce the PairGrid plot found in that tutorial, but locally my barcharts are not stacked as in the tutorial and I can't figure out how to make them so. import seaborn as sns import matplotlib.pyplot as plt # for graphics import…
Malik Koné
  • 635
  • 1
  • 7
  • 16
2
votes
1 answer

How to display a categorical dataframe in a pairplot

I am getting the following error: No variables found for grid columns? In the console it prints the dataframe ok, but when I want to display it in seaborn, it doesn't work. %matplotlib inline import seaborn as sns from ipywidgets import…
Paul Viorel
  • 234
  • 1
  • 11
2
votes
2 answers

Is it possible to do a "pair plot" in plolty?

In plotly for python, is there anyway to do a plot with multiple variables on the x-axis against a single variable on the y-axis? The scatter_matrix function uses every variable combination, but I am looking for just a single variable on the y-axis.…
Josh Singh
  • 23
  • 3
2
votes
0 answers

weird pairplot distribution after kmeans clustering

I made K-means clustering to a large dataset with 32000 features, Ps : I cant delete outliers because I want to detect them and make a cluster that contains anomalies in my data ... --> My Question is : Is it normal for the ditribution to be like…
2
votes
0 answers

Keep original color of classes in seaborn pairplot even though order of classes change in subsequent plots

I get a seaborn.pairplot plot (using the tab10_r palette) like this: If I change the order of the classes now to [0 1 2], to the same plot, I get this: I wanted to plot the same data but three different ways with the classes being in different…
Joe
  • 357
  • 2
  • 10
  • 32
2
votes
1 answer

Why doesn't the MinMaxScaler change the sns.pairplot of the dataset?

I'm trying to create a pairplot of my dataset, where the variables are vastly different numbers (some are in the 0-1 range, some, like age and Monthly Income, can go way higher) and I want to scale those variables that go above 1 to 0-1 using the…
mvinegret
  • 31
  • 5
2
votes
1 answer

Seaborn Pairplot with and without hue on top of each other

I am plotting a dataframe as a pairplot and fitting lowess lines using regplot in seaborn. I have used hue = "variable", but would like to see the lowess line fitted on the whole data (non-hue) in the same pairplot as well. I would appreciate any…
Nazanin
  • 81
  • 7
1
2 3