HyukjinKwon commented on a change in pull request #35000:
URL: https://github.com/apache/spark/pull/35000#discussion_r775300495



##########
File path: python/pyspark/pandas/plot/matplotlib.py
##########
@@ -383,7 +407,7 @@ def _make_plot(self):
 
             kwds = self._make_plot_keywords(kwds, y)
             artists = self._plot(ax, y, column_num=i, stacking_id=stacking_id, 
**kwds)
-            self._add_legend_handle(artists[0], label, index=i)
+            self._append_legend_handles_labels(artists[0], label)

Review comment:
       and maybe:
   
   ```suggestion
               # Makes plotting compatible with pandas < 1.3, see 
pandas-dev/pandas#40078.
               self._append_legend_handles_labels(artists[0], label) if hasattr(
                   self, "_append_legend_handles_labels"
               ) else self._add_legend_handle(artists[0], label, index=i)
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to