diff --git a/doc/source/whatsnew/v1.5.3.rst b/doc/source/whatsnew/v1.5.3.rst index d65446604a83f..e7428956c50b5 100644 --- a/doc/source/whatsnew/v1.5.3.rst +++ b/doc/source/whatsnew/v1.5.3.rst @@ -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`) - .. --------------------------------------------------------------------------- diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 529849e740169..aef1eb5d59e68 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -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