diff --git a/python/pyspark/pandas/plot/matplotlib.py b/python/pyspark/pandas/plot/matplotlib.py index 030623605e513..c80966af94106 100644 --- a/python/pyspark/pandas/plot/matplotlib.py +++ b/python/pyspark/pandas/plot/matplotlib.py @@ -392,7 +392,8 @@ def _make_plot(self): kwds = self.kwds.copy() label = pprint_thing(label if len(label) > 1 else label[0]) - # `if hasattr(...)` makes plotting compatible with pandas < 1.3, see pandas-dev/pandas#40078. + # `if hasattr(...)` makes plotting compatible with pandas < 1.3, + # see pandas-dev/pandas#40078. label = ( self._mark_right_label(label, index=i) if hasattr(self, "_mark_right_label") @@ -406,7 +407,8 @@ def _make_plot(self): kwds = self._make_plot_keywords(kwds, y) artists = self._plot(ax, y, column_num=i, stacking_id=stacking_id, **kwds) - # `if hasattr(...)` makes plotting compatible with pandas < 1.3, see pandas-dev/pandas#40078. + # `if hasattr(...)` 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) @@ -492,7 +494,8 @@ def _make_plot(self): kwds = self.kwds.copy() label = pprint_thing(label if len(label) > 1 else label[0]) - # `if hasattr(...)` makes plotting compatible with pandas < 1.3, see pandas-dev/pandas#40078. + # `if hasattr(...)` makes plotting compatible with pandas < 1.3, + # see pandas-dev/pandas#40078. label = ( self._mark_right_label(label, index=i) if hasattr(self, "_mark_right_label") @@ -506,7 +509,8 @@ def _make_plot(self): kwds = self._make_plot_keywords(kwds, y) artists = self._plot(ax, y, column_num=i, stacking_id=stacking_id, **kwds) - # `if hasattr(...)` makes plotting compatible with pandas < 1.3, see pandas-dev/pandas#40078. + # `if hasattr(...)` 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)