From 9c75383e2f7a3a092e555dc795e6b133358fe86e Mon Sep 17 00:00:00 2001 From: MarcoGorelli <> Date: Tue, 22 Nov 2022 10:11:17 +0000 Subject: [PATCH 1/2] wip --- pandas/plotting/_core.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 529849e740169..0ce1ae570c6ac 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -1681,18 +1681,6 @@ 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) def hexbin( From cd96e4fb6cab84d18a428e03f66910ff30a7b50b Mon Sep 17 00:00:00 2001 From: MarcoGorelli <> Date: Tue, 22 Nov 2022 10:23:11 +0000 Subject: [PATCH 2/2] enforce removal --- doc/source/whatsnew/v2.0.0.rst | 1 + pandas/plotting/_core.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 20e99d007c798..aac471ed98de8 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -570,6 +570,7 @@ Removal of prior version deprecations/changes - Changed default of ``numeric_only`` to ``False`` in all DataFrame methods with that argument (:issue:`46096`, :issue:`46906`) - Changed default of ``numeric_only`` to ``False`` in :meth:`Series.rank` (:issue:`47561`) - Enforced deprecation of silently dropping nuisance columns in groupby and resample operations when ``numeric_only=False`` (:issue:`41475`) +- Enforced reversion of ``color`` as an alias for ``c`` and ``size`` as an alias for ``s`` in function :meth:`DataFrame.plot.scatter` (:issue:`49732`) - .. --------------------------------------------------------------------------- diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 0ce1ae570c6ac..aef1eb5d59e68 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -1681,7 +1681,7 @@ def scatter(self, x, y, s=None, c=None, **kwargs) -> PlotAccessor: ... c='species', ... colormap='viridis') """ - 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