Legend question

How would I add a legend tag to a figure glyph, if I added the glyph like so:

fig = figure()
glyph = Circle(…)
rend = fig.add_glyph(source, glyph)

hover = HoverTool(renderers=rend)


I assume something like: fig.legend.circle = …

The reason I’m doing this way is that I have multiple glyphs, but only want hover functional for a subset.

Is there is a different way using the more traditional fig.glyph?

fig.circle(… legend=‘circle’)
hover = HoverTool(renderers = fig.circle)


Nevermind! bokeh/examples/models/file/synthetic.py is just what I was looking for.

Also this: bokeh/examples/models/file/legends.py