☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Inherit from another plot

Community Support
chris.r.armstrong
chris.r.armstrong

Hi everyone,

I have a scenario where I want to overlay a few glyphs onto different plots. The issue I’m running into is that these glyphs have their own HoverTool initialized in the following way:

p = figure()

annotations_source = ColumnDataSource(annotations_df.to_dict(‘list’))

annotated_tooltips = [(‘Date’, ‘@formatted_date’),
(‘App’, ‘@application’),
(‘Type’, ‘@type’),
(‘Description’, ‘@description’),
(‘Version’, ‘@version’)]

annotations_points_glyph = Circle(x=‘date’, y=‘max_y’, fill_color=‘grey’,
line_color=‘black’, size=10)

annotations_points_renderer = p.add_glyph(annotations_source, annotations_points_glyph)

annotated_hover_tool = HoverTool(renderers=[annotations_points_renderer], tooltips=annotated_tooltips)

I then import from this module into other plots and register the hover tool via p.add_tools. The issue is that the annotations glyphs are not rendering and I suspect it is because I’m using a separate figure object for them. Hope that makes sense!

⌁   Link to post
Sarah_Bird3
Sarah_Bird3

Hi Chris,

I’m not understanding can you post a more complete code example - maybe as a gist?

Sincerely,

Sarah Bird

···

On Thu, Aug 27, 2015 at 5:04 PM, chris.r.armstrong@gmail.com wrote:

Hi everyone,

I have a scenario where I want to overlay a few glyphs onto different plots. The issue I’m running into is that these glyphs have their own HoverTool initialized in the following way:

p = figure()

annotations_source = ColumnDataSource(annotations_df.to_dict(‘list’))

annotated_tooltips = [(‘Date’, ‘@formatted_date’),
(‘App’, ‘@application’),
(‘Type’, ‘@type’),
(‘Description’, ‘@description’),
(‘Version’, ‘@version’)]

annotations_points_glyph = Circle(x=‘date’, y=‘max_y’, fill_color=‘grey’,
line_color=‘black’, size=10)

annotations_points_renderer = p.add_glyph(annotations_source, annotations_points_glyph)

annotated_hover_tool = HoverTool(renderers=[annotations_points_renderer], tooltips=annotated_tooltips)

I then import from this module into other plots and register the hover tool via p.add_tools. The issue is that the annotations glyphs are not rendering and I suspect it is because I’m using a separate figure object for them. Hope that makes sense!

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/6b5a050c-de38-4122-b729-2aa0bb9e9723%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post

End of archived discussion · Replies are disabled