Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BUG:FutureWarning for palette parameter without hue in faceted distributions #61276

Copy link
Copy link
Closed
@lavaeagle2

Description

@lavaeagle2
Issue body actions

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

import seaborn as sns
import matplotlib.pyplot as plt

# Sample data
tips = sns.load_dataset("tips")

# Faceted distribution plot
sns.displot(data=tips, x="total_bill", palette="viridis")
plt.show()

Issue Description

When using faceted distributions with Seaborn and passing the palette parameter without assigning hue, a FutureWarning is raised. The warning suggests assigning hue and setting legend=False to avoid deprecation in future versions (v0.14.0). This behavior needs clarification or adjustment in Pandas' integration with Seaborn plotting functions.
observed behavior:
FutureWarning: Passing palette without assigning hue is deprecated and will be removed in v0.14.0. Assign the y variable to hue and set legend=False for the same effect.

Expected Behavior

The warning should either be suppressed or handled gracefully within Pandas' plotting functions when interfacing with Seaborn.

Installed Versions

/usr/local/lib/python3.11/dist-packages/_distutils_hack/init.py:31: UserWarning: Setuptools is replacing distutils. Support for replacing an already imported distutils is deprecated. In the future, this condition will fail. Register concerns at https://github.com/pypa/setuptools/issues/new?template=distutils-deprecation.yml
warnings.warn(

INSTALLED VERSIONS

commit : d9cdd2e
python : 3.11.12.final.0
python-bits : 64
OS : Linux
OS-release : 6.1.85+
Version : #1 SMP PREEMPT_DYNAMIC Thu Jun 27 21:05:47 UTC 2024
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : en_US.UTF-8
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 2.2.2
numpy : 2.0.2
pytz : 2025.2
dateutil : 2.8.2
setuptools : 75.2.0
pip : 24.1.2
Cython : 3.0.12
pytest : 8.3.5
hypothesis : None
sphinx : 8.2.3
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 5.3.1
html5lib : 1.1
pymysql : None
psycopg2 : 2.9.10
jinja2 : 3.1.6
IPython : 7.34.0
pandas_datareader : 0.10.0
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.13.3
bottleneck : 1.4.2
dataframe-api-compat : None
fastparquet : None
fsspec : 2025.3.2
gcsfs : 2025.3.2
matplotlib : 3.10.0
numba : 0.60.0
numexpr : 2.10.2
odfpy : None
openpyxl : 3.1.5
pandas_gbq : 0.28.0
pyarrow : 18.1.0
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : 1.14.1
sqlalchemy : 2.0.40
tables : 3.10.2
tabulate : 0.9.0
xarray : 2025.1.2
xlrd : 2.0.1
zstandard : 0.23.0
tzdata : 2025.2
qtpy : None
pyqt5 : None

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.