我正在尝试将图例添加到图形中,其中包含由multi_line方法创建的两条线.例:
p = figure(plot_width=300, plot_height=300)
p.multi_line(xs=[[4, 2, 5], [1, 3, 4]], ys=[[6, 5, 2], [6, 5, 7]], color=['blue','yellow'], legend="first")
Run Code Online (Sandbox Code Playgroud)
在这种情况下,图例仅适用于第一行.当图例被定义为列表时,会出现错误:
p.multi_line(xs=[[4, 2, 5], [1, 3, 4]], ys=[[6, 5, 2], [6, 5, 7]], color=['blue','yellow'], legend=["first","second"])
Run Code Online (Sandbox Code Playgroud)
可以在很多行中添加图例吗?
bokeh ×1