@@ -199,7 +199,6 @@ def close_axes(self, ax):
199199self .x_is_mpl_date = False
200200
201201def draw_bars (self ,bars ):
202-
203202# sort bars according to bar containers
204203mpl_traces = []
205204for container in self .bar_containers :
@@ -300,7 +299,7 @@ def draw_bar(self, coll):
300299 )# TODO ditto
301300if len (bar ["x" ])> 1 :
302301self .msg += " Heck yeah, I drew that bar chart\n "
303- self .plotly_fig .add_trace (bar ),
302+ self .plotly_fig .add_trace (bar )
304303if bar_gap is not None :
305304self .plotly_fig ["layout" ]["bargap" ]= bar_gap
306305else :
@@ -504,13 +503,13 @@ def draw_marked_line(self, **props):
504503marked_line ["x" ]= mpltools .mpl_dates_to_datestrings (
505504marked_line ["x" ],formatter
506505 )
507- self .plotly_fig .add_trace (marked_line ),
506+ self .plotly_fig .add_trace (marked_line )
508507self .msg += " Heck yeah, I drew that line\n "
509508elif props ["coordinates" ]== "axes" :
510509# dealing with legend graphical elements
511510self .draw_legend_shapes (mode = mode ,shape = shape ,** props )
512511else :
513- self .msg += " Line didn't have 'data' coordinates," " not drawing\n "
512+ self .msg += " Line didn't have 'data' coordinates, not drawing\n "
514513warnings .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):
574573self .msg += " Drawing path collection as markers\n "
575574self .draw_marked_line (** scatter_props )
576575else :
577- self .msg += " Path collection not linked to 'data'," " not drawing\n "
576+ self .msg += " Path collection not linked to 'data', not drawing\n "
578577warnings .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):
675674else :# just a regular text annotation...
676675self .msg += " Text object is a normal annotation\n "
677676if 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 "
681678x_px ,y_px = (
682679props ["mplobj" ].get_transform ().transform (props ["position" ])
683680 )
@@ -687,7 +684,7 @@ def draw_text(self, **props):
687684xanchor = props ["style" ]["halign" ]# no difference here!
688685yanchor = mpltools .convert_va (props ["style" ]["valign" ])
689686else :
690- self .msg += " Text object is linked to 'data'" " coordinates\n "
687+ self .msg += " Text object is linked to 'data' coordinates\n "
691688x ,y = props ["position" ]
692689axis_ct = self .axis_ct
693690xaxis = self .plotly_fig ["layout" ]["xaxis{0}" .format (axis_ct )]
@@ -763,9 +760,7 @@ def draw_title(self, **props):
763760 """
764761self .msg += " Attempting to draw a title\n "
765762if 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 "
769764x_px ,y_px = props ["mplobj" ].get_transform ().transform (props ["position" ])
770765x ,y = mpltools .display_to_paper (x_px ,y_px ,self .plotly_fig ["layout" ])
771766annotation = go .layout .Annotation (
@@ -783,9 +778,7 @@ def draw_title(self, **props):
783778 )
784779self .plotly_fig ["layout" ]["annotations" ]+= (annotation ,)
785780else :
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 "
789782self .plotly_fig ["layout" ]["title" ]= props ["text" ]
790783title_font = dict (
791784size = props ["style" ]["fontsize" ],color = props ["style" ]["color" ]