You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/12/27 00:40:06 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #35000: [SPARK-37730][PYTHON] Replace use of MPLPlot._add_legend_handle with MPLPlot._append_legend_handles_labels

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



##########
File path: python/pyspark/pandas/plot/matplotlib.py
##########
@@ -375,6 +398,7 @@ def _make_plot(self):
             kwds = self.kwds.copy()
 
             label = pprint_thing(label if len(label) > 1 else label[0])
+            label = self._mark_right_label(label, index=i)

Review comment:
       How about this approach? I think this might be simpler.
   
   ```suggestion
               # Makes plotting compatible with pandas < 1.3
               label = self._mark_right_label(
                   label, index=i) if hasattr(self, "_mark_right_label") else label
   ```




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org