Is it possible to create/use a custom marker?


I would like to use a custom marker on bokeh plots, it would be a png image or a svg icon, is it possible ?

I understood that the available list of markers is the following one :

Thank you

Is the PNG accessible at a remote URL? Then I would first look at iamge_url as an option

image_url — Bokeh 3.0.3 Documentation

If not, it’s possible that converting the image to an RGBA array and using vectorized image_rgba might be an option. It’s also possible to set images as custom hatch fill patterns for existing markers, but that’s probably not going to be what you want unless it’s OK to lose some control over how the image is positioned inside the glyph.

Finally, it’s definitely possible to implement custom extension glyphs, but custom extensions are definitely an advanced topic:

Custom extensions — Bokeh 3.0.3 Documentation

1 Like

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