How to add text annotation in Bokeh?

I am looking for the Matplotlib 1 text annotation in Bokeh, but I could not find it in my User Guide 2 or in the links.

+6
source share
2 answers

Starting with version 0.12.2, you must use the "label" glyph to add text annotations.

from bokeh.models import Label p = figure(...) mytext = Label(x=70, y=70, text='here your text') p.add_layout(mytext) show(p) 

Please find the full example in the documentation: http://docs.bokeh.org/en/latest/docs/user_guide/annotations.html#userguide-annotations

+13
source

This "text" function falls under the "glyphs": here you will find the page here

+4
source

Source: https://habr.com/ru/post/988660/


All Articles