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

DOC: df.plot() is missing color parameter on documentation #61020

Open
1 task done
eicchen02 opened this issue Feb 28, 2025 · 4 comments · May be fixed by #61078
Open
1 task done

DOC: df.plot() is missing color parameter on documentation #61020

eicchen02 opened this issue Feb 28, 2025 · 4 comments · May be fixed by #61078
Assignees
Labels

Comments

@eicchen02
Copy link

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html

Documentation problem

The documentaion only makes reference to colormap and colorbar for color options. Though it also mentions that you can pass matplotlib method, this may not be directly intuitive to someone who is less familiar with the library.

Suggested fix for documentation

If adding it directly as a parameter in the documentation isn't suitable, having a "commonly used matplotlib parameters" could be helpful.

@eicchen02 eicchen02 added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 28, 2025
@ethandavidlee
Copy link

take

@rhshadrach
Copy link
Member

Thanks for the report! Related: #11042

Since pandas can interact with multiple backends, and these can have different arguments, we'd need to add a compatibility layer and some backends could take some arguments but not others. As such, I think it's better to document arguments for each backend.

I'd suggest adding a subsection to the section

https://pandas.pydata.org/pandas-docs/dev/user_guide/visualization.html#plotting-backends

for each backend with arguments it can take. We should add an example usage with any argument we're documenting so that documentation building breaks if the third party package changes.

@rhshadrach rhshadrach added Visualization plotting and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 2, 2025
@ethandavidlee
Copy link

I can add a subsection, Backend-Specific Plotting Arguments, under Plotting Backends, noting that Matplotlib is the default backend but Pandas supports multiple backends, such as Plotly and Bokeh. In this section, I'll list commonly used optional arguments and indicate which backends support them, with links to each backend’s full documentation for further information.

I also think it would be helpful to update the df.plot() documentation to reference this new section to address the original concern RE the color argument by making the backend-specific arguments easier to find.

@eicchen02
Copy link
Author

I also think it would be helpful to update the df.plot() documentation to reference this new section to address the original concern RE the color argument by making the backend-specific arguments easier to find.

I also agree with this, as it may not be intuitive for someone who is just looking up the function to visit the plotting backend page to find the information they would need. I know it certainly didn't occur to me to do so.

@ethandavidlee ethandavidlee linked a pull request Mar 7, 2025 that will close this issue
5 tasks
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.

3 participants