You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-37730][PYTHON] Replace use of MPLPlot._add_legend_handle with MPLPlot._append_legend_handles_labels
### What changes were proposed in this pull request?
Replace use of MPLPlot._add_legend_handle (removed in pandas) with MPLPlot._append_legend_handles_labels in histogram and KDE plots.
Based on: pandas-dev/pandas@029907c
### Why are the changes needed?
Fix of SPARK-37730. plot.hist and plot.kde don't throw AttributeError for pandas=1.3.5.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
~~Tested with existing plot test on CI (for older pandas only).~~ (it seems that CI doesn't run matplotlib tests, see #35000 (comment))
I've run tests on a local computer, see #35000 (comment) :
```
$ python python/pyspark/pandas/tests/plot/test_series_plot_matplotlib.py
```
:question: **QUESTION:** Maybe add plot testing for pandas 1.3.5 on CI? (I've noticed that CI uses `pandas=1.3.4`, maybe update it to `1.3.5`?)
Closes#35000 from mslapek/fixpythonplot.
Authored-by: Michał Słapek <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
(cherry picked from commit 371e307)
Signed-off-by: Dongjoon Hyun <[email protected]>
0 commit comments