Seaborn pairplot warning not understandable

393 Views Asked by At

I give a small example to make the question clearer:

import pandas as pd
import seaborn as sns

df = pd.DataFrame(
         [
             [28, 72, 12],
             [28, 17, 25],
             [54, 15, 45],
             [30, 57, 28]
         ],
         columns = ["x", "y", "z"]
    )
cols = list(df.columns)
sns.pairplot(df)

The warning generated is as follows:

C:\Users\thaly\anaconda3\lib\site-packages\seaborn\axisgrid.py:1444: 
MatplotlibDeprecationWarning: The join function was deprecated in Matplotlib 3.6
and will be removed two minor releases later.
  group.join(ax, diag_axes[0])

I totally don't understand the information given : group.join(ax, diag_axes[0])...

What do you think I should write instead of my simple line : sns.pairplot(df) ? (from which apparently comes the problem)

1

There are 1 best solutions below

1
On

As mentioned in the comments, this warning is triggered in an interaction between seaborn and matplotlib and isn't caused (or avoidable) by any user action.

Furthermore, the seaborn v0.12.0 release includes updated code that does not trigger this warning.