For removing box annotation, it seems solution was following.
In short:
Using Bokeh Server, I can add and delete box annotations no problem prior to the plot being displayed using some helper functions. However, once the plot is displayed to the user, I can add box annotations with call-backs, but can not delete the box annotations using callback buttons and the exact same helper functions. If it was a scope issue, I would expect add and delete to either both work, or both not work.
In detail:
To see what I mean, go to line 138 where the debugging cod…
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