Skip to content

DEPR: Clean up of pandas.plotting #28177

Open
@datapythonista

Description

@datapythonista

xref: #26747, #28159

The current plotting API feels inconsistent and I think it's the one we have for historical reasons, and not the one we want. I propose the next changes:

  1. Leave the current API based on the .plot accessor as is (e.g. Series.plot.hist, Series.plot(kind='box')). In the future we should consider two things:
  • Whether we want backend to be able to add plots that we don't define
  • Move all the matplotlib specific parameters to **kwargs
  1. Remove all duplicate functions:
  • hist_series (Series.hist -> Series.plot.hist)
  • hist_frame (DataFrame.hist -> DataFrame.plot.hist)
  • boxplot (pandas.plotting.boxplot -> DataFrame.plot.box)
  • boxplot_frame (DataFrame.boxplot -> DataFrame.plot.box)
  1. Move the matplotlib backend to a separate project (pandas.plotting._matplotlib -> pandas_matplotlib)

  2. Move to the matplotlib backend the non-accessor plotting functions:

  • andrews_curves (pandas.plotting.andrews_curves -> pandas_matplotlib.andrews_curves)
  • autocorrelation_plot
  • bootstrap_plot
  • lag_plot
  • parallel_coordinates
  • radviz
  • scatter_matrix
  • table
  1. Move to the matplotlib backend register/unregister of the converters (pandas.plotting.register->pandas_matplotlib.register`)

CC: @pandas-dev/pandas-core @jakevdp

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeprecateFunctionality to remove in pandasNeeds DiscussionRequires discussion from core team before further actionVisualizationplotting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions