@@ -207,7 +207,6 @@ def close_axes(self, ax):
207
207
self .x_is_mpl_date = False
208
208
209
209
def draw_bars (self , bars ):
210
-
211
210
# sort bars according to bar containers
212
211
mpl_traces = []
213
212
for container in self .bar_containers :
@@ -308,7 +307,7 @@ def draw_bar(self, coll):
308
307
) # TODO ditto
309
308
if len (bar ["x" ]) > 1 :
310
309
self .msg += " Heck yeah, I drew that bar chart\n "
311
- self .plotly_fig .add_trace (bar ),
310
+ self .plotly_fig .add_trace (bar )
312
311
if bar_gap is not None :
313
312
self .plotly_fig ["layout" ]["bargap" ] = bar_gap
314
313
else :
@@ -506,13 +505,13 @@ def draw_marked_line(self, **props):
506
505
marked_line ["x" ] = mpltools .mpl_dates_to_datestrings (
507
506
marked_line ["x" ], formatter
508
507
)
509
- self .plotly_fig .add_trace (marked_line ),
508
+ self .plotly_fig .add_trace (marked_line )
510
509
self .msg += " Heck yeah, I drew that line\n "
511
510
elif props ["coordinates" ] == "axes" :
512
511
# dealing with legend graphical elements
513
512
self .draw_legend_shapes (mode = mode , shape = shape , ** props )
514
513
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 "
516
515
warnings .warn (
517
516
"Bummer! Plotly can currently only draw Line2D "
518
517
"objects from matplotlib that are in 'data' "
@@ -576,7 +575,7 @@ def draw_path_collection(self, **props):
576
575
self .msg += " Drawing path collection as markers\n "
577
576
self .draw_marked_line (** scatter_props )
578
577
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 "
580
579
warnings .warn (
581
580
"Dang! That path collection is out of this "
582
581
"world. I totally don't know what to do with "
@@ -677,9 +676,7 @@ def draw_text(self, **props):
677
676
else : # just a regular text annotation...
678
677
self .msg += " Text object is a normal annotation\n "
679
678
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 "
683
680
x_px , y_px = (
684
681
props ["mplobj" ].get_transform ().transform (props ["position" ])
685
682
)
@@ -689,7 +686,7 @@ def draw_text(self, **props):
689
686
xanchor = props ["style" ]["halign" ] # no difference here!
690
687
yanchor = mpltools .convert_va (props ["style" ]["valign" ])
691
688
else :
692
- self .msg += " Text object is linked to 'data' " " coordinates\n "
689
+ self .msg += " Text object is linked to 'data' coordinates\n "
693
690
x , y = props ["position" ]
694
691
axis_ct = self .axis_ct
695
692
xaxis = self .plotly_fig ["layout" ]["xaxis{0}" .format (axis_ct )]
@@ -765,9 +762,7 @@ def draw_title(self, **props):
765
762
"""
766
763
self .msg += " Attempting to draw a title\n "
767
764
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 "
771
766
x_px , y_px = props ["mplobj" ].get_transform ().transform (props ["position" ])
772
767
x , y = mpltools .display_to_paper (x_px , y_px , self .plotly_fig ["layout" ])
773
768
annotation = go .layout .Annotation (
@@ -785,9 +780,7 @@ def draw_title(self, **props):
785
780
)
786
781
self .plotly_fig ["layout" ]["annotations" ] += (annotation ,)
787
782
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 "
791
784
self .plotly_fig ["layout" ]["title" ] = props ["text" ]
792
785
title_font = dict (
793
786
size = props ["style" ]["fontsize" ], color = props ["style" ]["color" ]
0 commit comments