@@ -200,7 +200,6 @@ def close_axes(self, ax):
200
200
self .x_is_mpl_date = False
201
201
202
202
def draw_bars (self , bars ):
203
-
204
203
# sort bars according to bar containers
205
204
mpl_traces = []
206
205
for container in self .bar_containers :
@@ -301,7 +300,7 @@ def draw_bar(self, coll):
301
300
) # TODO ditto
302
301
if len (bar ["x" ]) > 1 :
303
302
self .msg += " Heck yeah, I drew that bar chart\n "
304
- self .plotly_fig .add_trace (bar ),
303
+ self .plotly_fig .add_trace (bar )
305
304
if bar_gap is not None :
306
305
self .plotly_fig ["layout" ]["bargap" ] = bar_gap
307
306
else :
@@ -499,13 +498,13 @@ def draw_marked_line(self, **props):
499
498
marked_line ["x" ] = mpltools .mpl_dates_to_datestrings (
500
499
marked_line ["x" ], formatter
501
500
)
502
- self .plotly_fig .add_trace (marked_line ),
501
+ self .plotly_fig .add_trace (marked_line )
503
502
self .msg += " Heck yeah, I drew that line\n "
504
503
elif props ["coordinates" ] == "axes" :
505
504
# dealing with legend graphical elements
506
505
self .draw_legend_shapes (mode = mode , shape = shape , ** props )
507
506
else :
508
- self .msg += " Line didn't have 'data' coordinates, " " not drawing\n "
507
+ self .msg += " Line didn't have 'data' coordinates, not drawing\n "
509
508
warnings .warn (
510
509
"Bummer! Plotly can currently only draw Line2D "
511
510
"objects from matplotlib that are in 'data' "
@@ -569,7 +568,7 @@ def draw_path_collection(self, **props):
569
568
self .msg += " Drawing path collection as markers\n "
570
569
self .draw_marked_line (** scatter_props )
571
570
else :
572
- self .msg += " Path collection not linked to 'data', " " not drawing\n "
571
+ self .msg += " Path collection not linked to 'data', not drawing\n "
573
572
warnings .warn (
574
573
"Dang! That path collection is out of this "
575
574
"world. I totally don't know what to do with "
@@ -670,9 +669,7 @@ def draw_text(self, **props):
670
669
else : # just a regular text annotation...
671
670
self .msg += " Text object is a normal annotation\n "
672
671
if props ["coordinates" ] != "data" :
673
- self .msg += (
674
- " Text object isn't linked to 'data' " "coordinates\n "
675
- )
672
+ self .msg += " Text object isn't linked to 'data' coordinates\n "
676
673
x_px , y_px = (
677
674
props ["mplobj" ].get_transform ().transform (props ["position" ])
678
675
)
@@ -682,7 +679,7 @@ def draw_text(self, **props):
682
679
xanchor = props ["style" ]["halign" ] # no difference here!
683
680
yanchor = mpltools .convert_va (props ["style" ]["valign" ])
684
681
else :
685
- self .msg += " Text object is linked to 'data' " " coordinates\n "
682
+ self .msg += " Text object is linked to 'data' coordinates\n "
686
683
x , y = props ["position" ]
687
684
axis_ct = self .axis_ct
688
685
xaxis = self .plotly_fig ["layout" ]["xaxis{0}" .format (axis_ct )]
@@ -758,9 +755,7 @@ def draw_title(self, **props):
758
755
"""
759
756
self .msg += " Attempting to draw a title\n "
760
757
if len (self .mpl_fig .axes ) > 1 :
761
- self .msg += (
762
- " More than one subplot, adding title as " "annotation\n "
763
- )
758
+ self .msg += " More than one subplot, adding title as annotation\n "
764
759
x_px , y_px = props ["mplobj" ].get_transform ().transform (props ["position" ])
765
760
x , y = mpltools .display_to_paper (x_px , y_px , self .plotly_fig ["layout" ])
766
761
annotation = go .layout .Annotation (
@@ -778,9 +773,7 @@ def draw_title(self, **props):
778
773
)
779
774
self .plotly_fig ["layout" ]["annotations" ] += (annotation ,)
780
775
else :
781
- self .msg += (
782
- " Only one subplot found, adding as a " "plotly title\n "
783
- )
776
+ self .msg += " Only one subplot found, adding as a plotly title\n "
784
777
self .plotly_fig ["layout" ]["title" ] = props ["text" ]
785
778
title_font = dict (
786
779
size = props ["style" ]["fontsize" ], color = props ["style" ]["color" ]
0 commit comments