@@ -199,7 +199,6 @@ def close_axes(self, ax):
199
199
self .x_is_mpl_date = False
200
200
201
201
def draw_bars (self , bars ):
202
-
203
202
# sort bars according to bar containers
204
203
mpl_traces = []
205
204
for container in self .bar_containers :
@@ -300,7 +299,7 @@ def draw_bar(self, coll):
300
299
) # TODO ditto
301
300
if len (bar ["x" ]) > 1 :
302
301
self .msg += " Heck yeah, I drew that bar chart\n "
303
- self .plotly_fig .add_trace (bar ),
302
+ self .plotly_fig .add_trace (bar )
304
303
if bar_gap is not None :
305
304
self .plotly_fig ["layout" ]["bargap" ] = bar_gap
306
305
else :
@@ -504,13 +503,13 @@ def draw_marked_line(self, **props):
504
503
marked_line ["x" ] = mpltools .mpl_dates_to_datestrings (
505
504
marked_line ["x" ], formatter
506
505
)
507
- self .plotly_fig .add_trace (marked_line ),
506
+ self .plotly_fig .add_trace (marked_line )
508
507
self .msg += " Heck yeah, I drew that line\n "
509
508
elif props ["coordinates" ] == "axes" :
510
509
# dealing with legend graphical elements
511
510
self .draw_legend_shapes (mode = mode , shape = shape , ** props )
512
511
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 "
514
513
warnings .warn (
515
514
"Bummer! Plotly can currently only draw Line2D "
516
515
"objects from matplotlib that are in 'data' "
@@ -574,7 +573,7 @@ def draw_path_collection(self, **props):
574
573
self .msg += " Drawing path collection as markers\n "
575
574
self .draw_marked_line (** scatter_props )
576
575
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 "
578
577
warnings .warn (
579
578
"Dang! That path collection is out of this "
580
579
"world. I totally don't know what to do with "
@@ -675,9 +674,7 @@ def draw_text(self, **props):
675
674
else : # just a regular text annotation...
676
675
self .msg += " Text object is a normal annotation\n "
677
676
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 "
681
678
x_px , y_px = (
682
679
props ["mplobj" ].get_transform ().transform (props ["position" ])
683
680
)
@@ -687,7 +684,7 @@ def draw_text(self, **props):
687
684
xanchor = props ["style" ]["halign" ] # no difference here!
688
685
yanchor = mpltools .convert_va (props ["style" ]["valign" ])
689
686
else :
690
- self .msg += " Text object is linked to 'data' " " coordinates\n "
687
+ self .msg += " Text object is linked to 'data' coordinates\n "
691
688
x , y = props ["position" ]
692
689
axis_ct = self .axis_ct
693
690
xaxis = self .plotly_fig ["layout" ]["xaxis{0}" .format (axis_ct )]
@@ -763,9 +760,7 @@ def draw_title(self, **props):
763
760
"""
764
761
self .msg += " Attempting to draw a title\n "
765
762
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 "
769
764
x_px , y_px = props ["mplobj" ].get_transform ().transform (props ["position" ])
770
765
x , y = mpltools .display_to_paper (x_px , y_px , self .plotly_fig ["layout" ])
771
766
annotation = go .layout .Annotation (
@@ -783,9 +778,7 @@ def draw_title(self, **props):
783
778
)
784
779
self .plotly_fig ["layout" ]["annotations" ] += (annotation ,)
785
780
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 "
789
782
self .plotly_fig ["layout" ]["title" ] = props ["text" ]
790
783
title_font = dict (
791
784
size = props ["style" ]["fontsize" ], color = props ["style" ]["color" ]
0 commit comments