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

PLT: Cleaner plotting backend API, and unify Series and DataFrame accessors #27009

Merged
merged 33 commits into from
Jul 3, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f279d16
Some experiments so far
datapythonista Jun 21, 2019
ca5671c
Refactoring of pandas plotting to make the API clearer
datapythonista Jun 23, 2019
8a56ad7
Merge remote-tracking branch 'upstream/master' into plot_api
Jun 25, 2019
196388b
Addressing review comments, and fixing many tests (still some tests f…
Jun 25, 2019
f00ec30
Merge remote-tracking branch 'upstream/master' into plot_api
Jun 25, 2019
1c16faa
Merge remote-tracking branch 'upstream/master' into plot_api
Jun 26, 2019
995d72e
Restoring docstrings of hist_series, hist_frame, boxplot and boxplot_…
Jun 26, 2019
7e45996
Fixing plot accessor docstring (was in the wrong place, and couple of…
Jun 26, 2019
4fbfed0
Fixing hexbin plot tests
Jun 26, 2019
7d7263a
Fixing bug when calling plot twice on the same data, since the data (…
Jun 26, 2019
1a03cbf
Raising missing exception for pie in DataFrame, and fixing accessor s…
Jun 26, 2019
cf7cbc0
Fixing bug that shown the legend for Series plot
Jun 26, 2019
d063e05
Fix linting
Jun 26, 2019
c83551d
Merge remote-tracking branch 'upstream/master' into plot_api
Jun 28, 2019
369fbf1
Merge remote-tracking branch 'upstream/master' into plot_api
Jul 1, 2019
0d146f9
Fixing bug that made reusing the previous plot for dataframes
Jul 1, 2019
34ea1f2
Removing duplicated data type checks
Jul 1, 2019
19489ba
Restoring original position of methods, so the diff is smaller
Jul 1, 2019
9b4fc6d
Fixing name of reuse_plot parameter
Jul 1, 2019
2597bc9
Fixing bug with matplotlib 2
Jul 1, 2019
57c4937
Adding documentation and improving comments, based on Jeff review
Jul 2, 2019
263ee7a
Adding FutureWarning if Series.plot is called with positional arguments
Jul 2, 2019
37fe165
Not passing default matplotlib parameters to backends (all known kwar…
Jul 2, 2019
0cf4514
Fixing test of plotting accessor parameters
Jul 2, 2019
4d70d5d
Temporary not warning for Series.plot positional arguments (looks lik…
Jul 2, 2019
a2330b2
Revert "Temporary not warning for Series.plot positional arguments (l…
Jul 2, 2019
42a1b35
Merge remote-tracking branch 'upstream/master' into plot_api
Jul 2, 2019
34d189f
Adding debug info in the CI for failing test
Jul 2, 2019
5819585
Revert "Adding debug info in the CI for failing test"
Jul 2, 2019
29d7547
Temporary removing the warning, to see if it's causing the andrews_cu…
Jul 2, 2019
37fb064
Merge branch 'master' into PR_TOOL_MERGE_PR_27009
jreback Jul 3, 2019
a5d0fd9
Revert "Temporary removing the warning, to see if it's causing the an…
datapythonista Jul 3, 2019
ce544e1
Removing test that causes parallel_coordinates test to fail
datapythonista Jul 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -8051,7 +8051,7 @@ def isin(self, values):

# ----------------------------------------------------------------------
# Add plotting methods to DataFrame
plot = CachedAccessor("plot", pandas.plotting.FramePlotMethods)
plot = CachedAccessor("plot", pandas.plotting.PlotAccessor)
hist = pandas.plotting.hist_frame
boxplot = pandas.plotting.boxplot_frame
sparse = CachedAccessor("sparse", SparseFrameAccessor)
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -4530,7 +4530,7 @@ def to_period(self, freq=None, copy=True):
str = CachedAccessor("str", StringMethods)
dt = CachedAccessor("dt", CombinedDatetimelikeProperties)
cat = CachedAccessor("cat", CategoricalAccessor)
plot = CachedAccessor("plot", pandas.plotting.SeriesPlotMethods)
plot = CachedAccessor("plot", pandas.plotting.PlotAccessor)
sparse = CachedAccessor("sparse", SparseAccessor)

# ----------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions pandas/plotting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Plotting public API
"""
from pandas.plotting._core import (
FramePlotMethods, SeriesPlotMethods, boxplot, boxplot_frame,
PlotAccessor, boxplot, boxplot_frame,
boxplot_frame_groupby, hist_frame, hist_series)
from pandas.plotting._misc import (
andrews_curves, autocorrelation_plot, bootstrap_plot,
Expand All @@ -11,7 +11,7 @@
register as register_matplotlib_converters, scatter_matrix, table)

__all__ = ['boxplot', 'boxplot_frame', 'boxplot_frame_groupby', 'hist_frame',
'hist_series', 'FramePlotMethods', 'SeriesPlotMethods',
'hist_series', 'PlotAccessor',
'scatter_matrix', 'radviz', 'andrews_curves', 'bootstrap_plot',
'parallel_coordinates', 'lag_plot', 'autocorrelation_plot',
'table', 'plot_params', 'register_matplotlib_converters',
Expand Down
Loading