Adding decoration to MultiLine

Hello!

I am trying to add decorations to MultiLine glyph. Although I see that all the glyphs have ‘decorations=’ keyword, it is not clear how to use it. The documentation says that this keyword can be used to draw arrow heads, and that is exactly I want to do. Here is the code snippet:

ml = MultiLine(xs=‘xs’, ys=‘ys’, line_color=‘black’, decorations=)
p.add_glyph(dataSource, ml)

What should I pass in ‘decorations’ argument so that I get arrow heads at the end of my line?

Thanks in advance :slight_smile:

Glyph decorations are still experimental / work in progress. Your best bet is to look at the example added in the original PR:

bokeh/examples/plotting/trefoil.py at branch-3.6 · bokeh/bokeh · GitHub

That said, multi_line is an oddball glyph, it may not actually work with decorations at all yet.

cc @mateusz

1 Like

Hi,

Thanks for the quick response! I wrote the code based on the example:

from bokeh.models import VeeHead
ml = p.multi_line(xs='xs', ys='ys', color='black', source=dataSource)
ml.add_decoration(VeeHead(size=10), "end")

The good thing is the code does not throw any exception, but it does not draw arrow heads. So, I am guessing the functionality exists but its not implemented yet. Lets hope it will be in near future!

Anyways for the time being, I can just use more multi_line to draw my arrow heads. :smiley:

I’d suggest filing a GitHub Issue since I don’t know that there is one for tracking this, specifically.

Hello!

Created the issue link, but I got the following reply from 3 guys within 1 minute. It seems like spam. :rofl: What do u think!?

It’s dangerous spam appearing on multiple issues since last night, I have blocked and deleted all the comments.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.