Repository: pandas-dev/pandas

Issue:
BUG: Series.plot(kind="pie") does not respect ylabel argument
### Pandas version checks

- [X] I have checked that this issue has not already been reported.

- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.

- [X] I have confirmed this bug exists on the [main branch](https://pandas.pydata.org/docs/dev/getting_started/install.html#installing-the-development-version-of-pandas) of pandas.


### Reproducible Example

```python
ser = pd.Series([1, 2, 4], index=["a", "b", "c"], name="my_series")
ser.plot(kind="pie", ylabel=None)
```
```


### Issue Description

The plot will always show the label "my_series", regardless of if you pass ylabel=None or not.

The only way to fix this is to do:

```python
ax = ser.plot(kind="pie")
ax2.set_ylabel(None)
```

### Expected Behavior

ylabel argument should be respected

### Installed Versions

main


Discussion:
take
Hi @WillAyd since the default for ylabel is None, the pie will never show label if that is not defined. Will never get the name of the Series as the behavior now. Is that what is expected?

Yea I think that is correct. I don't think any of the other chart types do that, so would be good to make them all consistent

Patch:
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst
index c77348b365370..d7110b446d327 100644
--- a/doc/source/whatsnew/v3.0.0.rst
+++ b/doc/source/whatsnew/v3.0.0.rst
@@ -42,6 +42,7 @@ Other enhancements
 - :meth:`DataFrame.cummin`, :meth:`DataFrame.cummax`, :meth:`DataFrame.cumprod` and :meth:`DataFrame.cumsum` methods now have a ``numeric_only`` parameter (:issue:`53072`)
 - :meth:`DataFrame.fillna` and :meth:`Series.fillna` can now accept ``value=None``; for non-object dtype the corresponding NA value will be used (:issue:`57723`)
 - :meth:`Series.cummin` and :meth:`Series.cummax` now supports :class:`CategoricalDtype` (:issue:`52335`)
+- :meth:`Series.plot` now correctly handle the ``ylabel`` parameter for pie charts, allowing for explicit control over the y-axis label (:issue:`58239`)
 
 .. ---------------------------------------------------------------------------
 .. _whatsnew_300.notable_bug_fixes:
diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py
index 38a75e741d60e..fffeb9b82492f 100644
--- a/pandas/plotting/_matplotlib/core.py
+++ b/pandas/plotting/_matplotlib/core.py
@@ -2077,9 +2077,6 @@ def _make_plot(self, fig: Figure) -> None:
 
         for i, (label, y) in enumerate(self._iter_data(data=self.data)):
             ax = self._get_ax(i)
-            if label is not None:
-                label = pprint_thing(label)
-                ax.set_ylabel(label)
 
             kwds = self.kwds.copy()
 


Test patch:
diff --git a/pandas/tests/plotting/frame/test_frame.py b/pandas/tests/plotting/frame/test_frame.py
index c30cb96fef252..adb56a40b0071 100644
--- a/pandas/tests/plotting/frame/test_frame.py
+++ b/pandas/tests/plotting/frame/test_frame.py
@@ -1629,7 +1629,7 @@ def test_pie_df_subplots(self):
         for ax in axes:
             _check_text_labels(ax.texts, df.index)
         for ax, ylabel in zip(axes, df.columns):
-            assert ax.get_ylabel() == ylabel
+            assert ax.get_ylabel() == ""
 
     def test_pie_df_labels_colors(self):
         df = DataFrame(
diff --git a/pandas/tests/plotting/test_series.py b/pandas/tests/plotting/test_series.py
index 9fbc20e10f5c1..54f09c7007330 100644
--- a/pandas/tests/plotting/test_series.py
+++ b/pandas/tests/plotting/test_series.py
@@ -378,7 +378,7 @@ def test_pie_series(self):
         )
         ax = _check_plot_works(series.plot.pie)
         _check_text_labels(ax.texts, series.index)
-        assert ax.get_ylabel() == "YLABEL"
+        assert ax.get_ylabel() == ""
 
     def test_pie_series_no_label(self):
         series = Series(