@@ -326,7 +326,7 @@ def draw_bar(self, coll):
326326 yaxis = "y{0}" .format (self .axis_ct ),
327327 opacity = trace [0 ]["alpha" ], # TODO: get all alphas if array?
328328 marker = go .bar .Marker (
329- color = trace [0 ]["facecolor" ], # TODO: get all
329+ color = _export_color ( trace [0 ]["facecolor" ]) , # TODO: get all
330330 line = dict (width = trace [0 ]["edgewidth" ]),
331331 ),
332332 ) # TODO ditto
@@ -388,9 +388,13 @@ def draw_marked_line(self, **props):
388388 self .msg += "... with just markers\n "
389389 mode = "markers"
390390 if props ["linestyle" ]:
391- color = mpltools .merge_color_and_opacity (
392- props ["linestyle" ]["color" ], props ["linestyle" ]["alpha" ]
393- )
391+ if props ["linestyle" ]["color" ] == "none" :
392+ # a fully transparent line; plotly rejects "none" as a color
393+ color = "rgba(0,0,0,0)"
394+ else :
395+ color = mpltools .merge_color_and_opacity (
396+ props ["linestyle" ]["color" ], props ["linestyle" ]["alpha" ]
397+ )
394398
395399 if props ["coordinates" ] == "data" :
396400 line = go .scatter .Line (
@@ -410,22 +414,22 @@ def draw_marked_line(self, **props):
410414 if props ["coordinates" ] == "data" :
411415 marker = go .scatter .Marker (
412416 opacity = props ["markerstyle" ]["alpha" ],
413- color = props ["markerstyle" ]["facecolor" ],
417+ color = _export_color ( props ["markerstyle" ]["facecolor" ]) ,
414418 symbol = mpltools .convert_symbol (props ["markerstyle" ]["marker" ]),
415419 size = props ["markerstyle" ]["markersize" ],
416420 line = dict (
417- color = props ["markerstyle" ]["edgecolor" ],
421+ color = _export_color ( props ["markerstyle" ]["edgecolor" ]) ,
418422 width = props ["markerstyle" ]["edgewidth" ],
419423 ),
420424 )
421425 else :
422426 shape = dict (
423427 opacity = props ["markerstyle" ]["alpha" ],
424- fillcolor = props ["markerstyle" ]["facecolor" ],
428+ fillcolor = _export_color ( props ["markerstyle" ]["facecolor" ]) ,
425429 symbol = mpltools .convert_symbol (props ["markerstyle" ]["marker" ]),
426430 size = props ["markerstyle" ]["markersize" ],
427431 line = dict (
428- color = props ["markerstyle" ]["edgecolor" ],
432+ color = _export_color ( props ["markerstyle" ]["edgecolor" ]) ,
429433 width = props ["markerstyle" ]["edgewidth" ],
430434 ),
431435 )
0 commit comments