Ken
February 27, 2022, 2:54pm
1
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
Bryan
March 3, 2022, 2:21am
2
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.
system
Closed
June 1, 2022, 2:21am
3
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.