Skip to content
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

BUG: Series.plot(kind="pie") does not respect ylabel argument #58239

Closed
3 tasks done
WillAyd opened this issue Apr 12, 2024 · 4 comments · Fixed by #58254
Closed
3 tasks done

BUG: Series.plot(kind="pie") does not respect ylabel argument #58239

WillAyd opened this issue Apr 12, 2024 · 4 comments · Fixed by #58254
Assignees
Labels

Comments

@WillAyd
Copy link
Member

WillAyd commented Apr 12, 2024

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

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

@WillAyd WillAyd added Bug Needs Triage Issue that has not been reviewed by a pandas team member Visualization plotting and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 12, 2024
@abeltavares
Copy link
Contributor

take

@abeltavares
Copy link
Contributor

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?

@WillAyd
Copy link
Member Author

WillAyd commented Apr 13, 2024

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

@abeltavares
Copy link
Contributor

@WillAyd
can you check the PR to close?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants