I have successfully created a multiline plot in bokeh with the colors for the lines as I want. I also correctly insert a legend by using the legend_field
argument to the Multiline constructor. On the graph though, to better show the location of the points, I also add a scatter plot with, again, chosen markers of the same color as the line.
The problem is that, correctly, the legend that is produced does not contain the markers on the line, but just the line color.
How can I add the markers in the legend? I have seen this solution Bokeh: How to show both color and marker type in legend - Stack Overflow that builds a list of pairs of colors and markers and then builds a custom legend object.
But I have seen there is a decorations
argument in Multiline constructor MultiLine — Bokeh 3.5.0 Documentation which I think can give me what I want without the hassle of building the legend myself. However, I have not found any example of Multiline that uses that so I am not sure how best create the list of decorations.
Any help?
Thanks a lot,