Skip to content

DEPR Enforce reversion of Size color aliases #49836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/whatsnew/v1.5.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Fixed regressions
~~~~~~~~~~~~~~~~~
- Fixed performance regression in :meth:`Series.isin` when ``values`` is empty (:issue:`49839`)
- Fixed regression in :meth:`DataFrameGroupBy.transform` when used with ``as_index=False`` (:issue:`49834`)
- Enforced reversion of ``color`` as an alias for ``c`` and ``size`` as an alias for ``s`` in function :meth:`DataFrame.plot.scatter` (:issue:`49732`)
-

.. ---------------------------------------------------------------------------
Expand Down
14 changes: 1 addition & 13 deletions pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1681,19 +1681,7 @@ def scatter(self, x, y, s=None, c=None, **kwargs) -> PlotAccessor:
... c='species',
... colormap='viridis')
"""
size = kwargs.pop("size", None)
if s is not None and size is not None:
raise TypeError("Specify exactly one of `s` and `size`")
if s is not None or size is not None:
kwargs["s"] = s if s is not None else size

color = kwargs.pop("color", None)
if c is not None and color is not None:
raise TypeError("Specify exactly one of `c` and `color`")
if c is not None or color is not None:
kwargs["c"] = c if c is not None else color

return self(kind="scatter", x=x, y=y, **kwargs)
return self(kind="scatter", x=x, y=y, s=s, c=c, **kwargs)

def hexbin(
self, x, y, C=None, reduce_C_function=None, gridsize=None, **kwargs
Expand Down