@@ -336,7 +336,7 @@ def draw_bar(self, coll):
336336 yaxis = "y{0}" .format (self .axis_ct ),
337337 opacity = trace [0 ]["alpha" ], # TODO: get all alphas if array?
338338 marker = go .bar .Marker (
339- color = trace [0 ]["facecolor" ], # TODO: get all
339+ color = _export_color ( trace [0 ]["facecolor" ]) , # TODO: get all
340340 line = dict (width = trace [0 ]["edgewidth" ]),
341341 ),
342342 ) # TODO ditto
@@ -398,9 +398,13 @@ def draw_marked_line(self, **props):
398398 self .msg += "... with just markers\n "
399399 mode = "markers"
400400 if props ["linestyle" ]:
401- color = mpltools .merge_color_and_opacity (
402- props ["linestyle" ]["color" ], props ["linestyle" ]["alpha" ]
403- )
401+ if props ["linestyle" ]["color" ] == "none" :
402+ # a fully transparent line; plotly rejects "none" as a color
403+ color = "rgba(0,0,0,0)"
404+ else :
405+ color = mpltools .merge_color_and_opacity (
406+ props ["linestyle" ]["color" ], props ["linestyle" ]["alpha" ]
407+ )
404408
405409 if props ["coordinates" ] == "data" :
406410 line = go .scatter .Line (
@@ -420,22 +424,22 @@ def draw_marked_line(self, **props):
420424 if props ["coordinates" ] == "data" :
421425 marker = go .scatter .Marker (
422426 opacity = props ["markerstyle" ]["alpha" ],
423- color = props ["markerstyle" ]["facecolor" ],
427+ color = _export_color ( props ["markerstyle" ]["facecolor" ]) ,
424428 symbol = mpltools .convert_symbol (props ["markerstyle" ]["marker" ]),
425429 size = props ["markerstyle" ]["markersize" ],
426430 line = dict (
427- color = props ["markerstyle" ]["edgecolor" ],
431+ color = _export_color ( props ["markerstyle" ]["edgecolor" ]) ,
428432 width = props ["markerstyle" ]["edgewidth" ],
429433 ),
430434 )
431435 else :
432436 shape = dict (
433437 opacity = props ["markerstyle" ]["alpha" ],
434- fillcolor = props ["markerstyle" ]["facecolor" ],
438+ fillcolor = _export_color ( props ["markerstyle" ]["facecolor" ]) ,
435439 symbol = mpltools .convert_symbol (props ["markerstyle" ]["marker" ]),
436440 size = props ["markerstyle" ]["markersize" ],
437441 line = dict (
438- color = props ["markerstyle" ]["edgecolor" ],
442+ color = _export_color ( props ["markerstyle" ]["edgecolor" ]) ,
439443 width = props ["markerstyle" ]["edgewidth" ],
440444 ),
441445 )
0 commit comments