@@ -199,7 +199,6 @@ def close_axes(self, ax):
199199 self .x_is_mpl_date = False
200200
201201 def draw_bars (self , bars ):
202-
203202 # sort bars according to bar containers
204203 mpl_traces = []
205204 for container in self .bar_containers :
@@ -300,7 +299,7 @@ def draw_bar(self, coll):
300299 ) # TODO ditto
301300 if len (bar ["x" ]) > 1 :
302301 self .msg += " Heck yeah, I drew that bar chart\n "
303- self .plotly_fig .add_trace (bar ),
302+ self .plotly_fig .add_trace (bar )
304303 if bar_gap is not None :
305304 self .plotly_fig ["layout" ]["bargap" ] = bar_gap
306305 else :
@@ -504,13 +503,13 @@ def draw_marked_line(self, **props):
504503 marked_line ["x" ] = mpltools .mpl_dates_to_datestrings (
505504 marked_line ["x" ], formatter
506505 )
507- self .plotly_fig .add_trace (marked_line ),
506+ self .plotly_fig .add_trace (marked_line )
508507 self .msg += " Heck yeah, I drew that line\n "
509508 elif props ["coordinates" ] == "axes" :
510509 # dealing with legend graphical elements
511510 self .draw_legend_shapes (mode = mode , shape = shape , ** props )
512511 else :
513- self .msg += " Line didn't have 'data' coordinates, " " not drawing\n "
512+ self .msg += " Line didn't have 'data' coordinates, not drawing\n "
514513 warnings .warn (
515514 "Bummer! Plotly can currently only draw Line2D "
516515 "objects from matplotlib that are in 'data' "
@@ -574,7 +573,7 @@ def draw_path_collection(self, **props):
574573 self .msg += " Drawing path collection as markers\n "
575574 self .draw_marked_line (** scatter_props )
576575 else :
577- self .msg += " Path collection not linked to 'data', " " not drawing\n "
576+ self .msg += " Path collection not linked to 'data', not drawing\n "
578577 warnings .warn (
579578 "Dang! That path collection is out of this "
580579 "world. I totally don't know what to do with "
@@ -675,9 +674,7 @@ def draw_text(self, **props):
675674 else : # just a regular text annotation...
676675 self .msg += " Text object is a normal annotation\n "
677676 if props ["coordinates" ] != "data" :
678- self .msg += (
679- " Text object isn't linked to 'data' " "coordinates\n "
680- )
677+ self .msg += " Text object isn't linked to 'data' coordinates\n "
681678 x_px , y_px = (
682679 props ["mplobj" ].get_transform ().transform (props ["position" ])
683680 )
@@ -687,7 +684,7 @@ def draw_text(self, **props):
687684 xanchor = props ["style" ]["halign" ] # no difference here!
688685 yanchor = mpltools .convert_va (props ["style" ]["valign" ])
689686 else :
690- self .msg += " Text object is linked to 'data' " " coordinates\n "
687+ self .msg += " Text object is linked to 'data' coordinates\n "
691688 x , y = props ["position" ]
692689 axis_ct = self .axis_ct
693690 xaxis = self .plotly_fig ["layout" ]["xaxis{0}" .format (axis_ct )]
@@ -763,9 +760,7 @@ def draw_title(self, **props):
763760 """
764761 self .msg += " Attempting to draw a title\n "
765762 if len (self .mpl_fig .axes ) > 1 :
766- self .msg += (
767- " More than one subplot, adding title as " "annotation\n "
768- )
763+ self .msg += " More than one subplot, adding title as annotation\n "
769764 x_px , y_px = props ["mplobj" ].get_transform ().transform (props ["position" ])
770765 x , y = mpltools .display_to_paper (x_px , y_px , self .plotly_fig ["layout" ])
771766 annotation = go .layout .Annotation (
@@ -783,9 +778,7 @@ def draw_title(self, **props):
783778 )
784779 self .plotly_fig ["layout" ]["annotations" ] += (annotation ,)
785780 else :
786- self .msg += (
787- " Only one subplot found, adding as a " "plotly title\n "
788- )
781+ self .msg += " Only one subplot found, adding as a plotly title\n "
789782 self .plotly_fig ["layout" ]["title" ] = props ["text" ]
790783 title_font = dict (
791784 size = props ["style" ]["fontsize" ], color = props ["style" ]["color" ]
0 commit comments