Remove box annotation

For removing box annotation, it seems solution was following.

  • f.renderers = [r for r in f.renderers if r.name != ‘my_box_annotation’]

But it won’t work in current bokeh version 2.4.2.

These annotation object is not in plot.renderers.
How should I reach these annotation object ?

Thanks

Generally speaking, it’s better to toggle the visible attribute of things you want to hide/show, and update the the data or properties of existing models rather that add/delete objects wholesale.

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