Skip to content

DOC: state which matplotlib function receives the plot kwargs - #67057

Open
Panzerkampfwagen-del wants to merge 1 commit into
pandas-dev:mainfrom
Panzerkampfwagen-del:doc-plot-kwargs-destination
Open

DOC: state which matplotlib function receives the plot kwargs#67057
Panzerkampfwagen-del wants to merge 1 commit into
pandas-dev:mainfrom
Panzerkampfwagen-del:doc-plot-kwargs-destination

Conversation

@Panzerkampfwagen-del

@Panzerkampfwagen-del Panzerkampfwagen-del commented Aug 28, 2026

Copy link
Copy Markdown
  • closes DOC: df.plot() is missing color parameter on documentation #61020

  • Tests added and passed (not applicable: docs-only change)

  • All code checks passed (ruff clean on the touched file; docstring build validated by CI)

  • Added type annotations (not applicable: no new arguments)

  • whatsnew entry (not applicable: docs-only change)

  • I have reviewed and followed all the contribution guidelines
    Check exactly one of the following, per the automated contributions policy:

  • I did not use AI to develop this pull request.

  • I used AI to develop this pull request. I have reviewed and understood every change, and I have described above how I used it and exactly which tool, model version, and effort setting.

How AI was used: Claude was used for identifying the issue, drafting this PR body, and preparing the docstring edits. I reviewed every change and verified each mapping against the matplotlib call sites in pandas/plotting/_matplotlib/ before staging it.

What does this PR do?

As discussed in #61020 (rhshadrach's comment of Apr 10), for the default matplotlib backend this adds to each DataFrame.plot method docstring the matplotlib function the keyword arguments are passed to, and extends the DataFrame.plot **kwargs entry accordingly:

  • plot.line, plot.areamatplotlib.axes.Axes.plot
  • plot.kde → density estimated with scipy.stats.gaussian_kde, curve drawn with matplotlib.axes.Axes.plot
  • plot.bar / plot.barhmatplotlib.axes.Axes.bar / matplotlib.axes.Axes.barh
  • plot.boxmatplotlib.axes.Axes.boxplot
  • plot.histmatplotlib.axes.Axes.hist
  • plot.piematplotlib.axes.Axes.pie
  • plot.scattermatplotlib.axes.Axes.scatter
  • plot.hexbinmatplotlib.axes.Axes.hexbin

Every mapping was verified against the call sites in pandas/plotting/_matplotlib/ (ax.plot, ax.bar, ax.barh, ax.boxplot, ax.hist, ax.pie, ax.scatter, ax.hexbin).

As jbrockmendel noted in the issue, arguments specific to third-party backends are deliberately not documented here.

For the default matplotlib backend, document in each DataFrame.plot
method docstring which matplotlib function the keyword arguments are
passed to (Axes.plot, Axes.bar, Axes.barh, Axes.boxplot, Axes.hist,
Axes.pie, Axes.scatter, Axes.hexbin), as discussed in pandas-dev#61020.
@github-actions github-actions Bot added the Awaiting Review PR in the maintainers' court; exempt from staleness label Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting Review PR in the maintainers' court; exempt from staleness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant