@@ -207,7 +207,6 @@ def close_axes(self, ax):
207207 self .x_is_mpl_date = False
208208
209209 def draw_bars (self , bars ):
210-
211210 # sort bars according to bar containers
212211 mpl_traces = []
213212 for container in self .bar_containers :
@@ -308,7 +307,7 @@ def draw_bar(self, coll):
308307 ) # TODO ditto
309308 if len (bar ["x" ]) > 1 :
310309 self .msg += " Heck yeah, I drew that bar chart\n "
311- self .plotly_fig .add_trace (bar ),
310+ self .plotly_fig .add_trace (bar )
312311 if bar_gap is not None :
313312 self .plotly_fig ["layout" ]["bargap" ] = bar_gap
314313 else :
@@ -506,13 +505,13 @@ def draw_marked_line(self, **props):
506505 marked_line ["x" ] = mpltools .mpl_dates_to_datestrings (
507506 marked_line ["x" ], formatter
508507 )
509- self .plotly_fig .add_trace (marked_line ),
508+ self .plotly_fig .add_trace (marked_line )
510509 self .msg += " Heck yeah, I drew that line\n "
511510 elif props ["coordinates" ] == "axes" :
512511 # dealing with legend graphical elements
513512 self .draw_legend_shapes (mode = mode , shape = shape , ** props )
514513 else :
515- self .msg += " Line didn't have 'data' coordinates, " " not drawing\n "
514+ self .msg += " Line didn't have 'data' coordinates, not drawing\n "
516515 warnings .warn (
517516 "Bummer! Plotly can currently only draw Line2D "
518517 "objects from matplotlib that are in 'data' "
@@ -576,7 +575,7 @@ def draw_path_collection(self, **props):
576575 self .msg += " Drawing path collection as markers\n "
577576 self .draw_marked_line (** scatter_props )
578577 else :
579- self .msg += " Path collection not linked to 'data', " " not drawing\n "
578+ self .msg += " Path collection not linked to 'data', not drawing\n "
580579 warnings .warn (
581580 "Dang! That path collection is out of this "
582581 "world. I totally don't know what to do with "
@@ -677,9 +676,7 @@ def draw_text(self, **props):
677676 else : # just a regular text annotation...
678677 self .msg += " Text object is a normal annotation\n "
679678 if props ["coordinates" ] != "data" :
680- self .msg += (
681- " Text object isn't linked to 'data' " "coordinates\n "
682- )
679+ self .msg += " Text object isn't linked to 'data' coordinates\n "
683680 x_px , y_px = (
684681 props ["mplobj" ].get_transform ().transform (props ["position" ])
685682 )
@@ -689,7 +686,7 @@ def draw_text(self, **props):
689686 xanchor = props ["style" ]["halign" ] # no difference here!
690687 yanchor = mpltools .convert_va (props ["style" ]["valign" ])
691688 else :
692- self .msg += " Text object is linked to 'data' " " coordinates\n "
689+ self .msg += " Text object is linked to 'data' coordinates\n "
693690 x , y = props ["position" ]
694691 axis_ct = self .axis_ct
695692 xaxis = self .plotly_fig ["layout" ]["xaxis{0}" .format (axis_ct )]
@@ -765,9 +762,7 @@ def draw_title(self, **props):
765762 """
766763 self .msg += " Attempting to draw a title\n "
767764 if len (self .mpl_fig .axes ) > 1 :
768- self .msg += (
769- " More than one subplot, adding title as " "annotation\n "
770- )
765+ self .msg += " More than one subplot, adding title as annotation\n "
771766 x_px , y_px = props ["mplobj" ].get_transform ().transform (props ["position" ])
772767 x , y = mpltools .display_to_paper (x_px , y_px , self .plotly_fig ["layout" ])
773768 annotation = go .layout .Annotation (
@@ -785,9 +780,7 @@ def draw_title(self, **props):
785780 )
786781 self .plotly_fig ["layout" ]["annotations" ] += (annotation ,)
787782 else :
788- self .msg += (
789- " Only one subplot found, adding as a " "plotly title\n "
790- )
783+ self .msg += " Only one subplot found, adding as a plotly title\n "
791784 self .plotly_fig ["layout" ]["title" ] = props ["text" ]
792785 title_font = dict (
793786 size = props ["style" ]["fontsize" ], color = props ["style" ]["color" ]
0 commit comments