0

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)

tdy
  • 36,675
  • 19
  • 86
  • 83
Andrew
  • 926
  • 2
  • 17
  • 24
  • 1
    Maybe you could try to upgrade matplotlib to the latest version? Anyway, this is just an internal warning about possible future compatibility issues between seaborn and matplotlib, which can be safely ignored. – JohanC Dec 30 '22 at 17:30
  • For information the `Matplotlib` version I have is `matplotlib: 3.6.2` – Andrew Dec 30 '22 at 17:35
  • Oops, I meant upgrading seaborn – JohanC Dec 30 '22 at 17:37
  • Well, `Seaborn` version is `seaborn: 0.11.2` ... – Andrew Dec 30 '22 at 17:51
  • 2
    Seaborn's latest public version is `0.12.1`. The packages on which seaborn builds (matplotlib, pandas, numpy, scipy, ...) continuously evolve as bugs get fixed, new features are added, functions try to have a more uniform interface, etc. A change in one of these packages might ripple through, and seaborn will take it into account in its next version. Anyway, as this is just a warning unrelated to your code, you can safely ignore it. – JohanC Dec 30 '22 at 18:19

1 Answers1

1

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.

mwaskom
  • 46,693
  • 16
  • 125
  • 127