@@ -333,7 +333,7 @@ def draw_bar(self, coll):
333333 yaxis = "y{0}" .format (self .axis_ct ),
334334 opacity = trace [0 ]["alpha" ], # TODO: get all alphas if array?
335335 marker = go .bar .Marker (
336- color = trace [0 ]["facecolor" ], # TODO: get all
336+ color = _export_color ( trace [0 ]["facecolor" ]) , # TODO: get all
337337 line = dict (width = trace [0 ]["edgewidth" ]),
338338 ),
339339 ) # TODO ditto
@@ -395,9 +395,13 @@ def draw_marked_line(self, **props):
395395 self .msg += "... with just markers\n "
396396 mode = "markers"
397397 if props ["linestyle" ]:
398- color = mpltools .merge_color_and_opacity (
399- props ["linestyle" ]["color" ], props ["linestyle" ]["alpha" ]
400- )
398+ if props ["linestyle" ]["color" ] == "none" :
399+ # a fully transparent line; plotly rejects "none" as a color
400+ color = "rgba(0,0,0,0)"
401+ else :
402+ color = mpltools .merge_color_and_opacity (
403+ props ["linestyle" ]["color" ], props ["linestyle" ]["alpha" ]
404+ )
401405
402406 if props ["coordinates" ] == "data" :
403407 line = go .scatter .Line (
@@ -417,22 +421,22 @@ def draw_marked_line(self, **props):
417421 if props ["coordinates" ] == "data" :
418422 marker = go .scatter .Marker (
419423 opacity = props ["markerstyle" ]["alpha" ],
420- color = props ["markerstyle" ]["facecolor" ],
424+ color = _export_color ( props ["markerstyle" ]["facecolor" ]) ,
421425 symbol = mpltools .convert_symbol (props ["markerstyle" ]["marker" ]),
422426 size = props ["markerstyle" ]["markersize" ],
423427 line = dict (
424- color = props ["markerstyle" ]["edgecolor" ],
428+ color = _export_color ( props ["markerstyle" ]["edgecolor" ]) ,
425429 width = props ["markerstyle" ]["edgewidth" ],
426430 ),
427431 )
428432 else :
429433 shape = dict (
430434 opacity = props ["markerstyle" ]["alpha" ],
431- fillcolor = props ["markerstyle" ]["facecolor" ],
435+ fillcolor = _export_color ( props ["markerstyle" ]["facecolor" ]) ,
432436 symbol = mpltools .convert_symbol (props ["markerstyle" ]["marker" ]),
433437 size = props ["markerstyle" ]["markersize" ],
434438 line = dict (
435- color = props ["markerstyle" ]["edgecolor" ],
439+ color = _export_color ( props ["markerstyle" ]["edgecolor" ]) ,
436440 width = props ["markerstyle" ]["edgewidth" ],
437441 ),
438442 )
0 commit comments