@Steven_Van_Buskirk Bokeh is at it’s core, a “building block” architecture, with lots of small pieces that can be assembled in many ways. This has many benefits for both users and developers, but is not also without some drawbacks. One of those is that there are some times things that work well in simple scenarios that maybe don’t work as well in arbitrarily complicated assemblies some users might come up with. I’d say removing glyphs falls in to that category. It’s not impossible, but sometimes it’s more difficult or has subtle issues to deal with, and accordingly we just don’t want to encourage it as common usage.
If you just have one simple plot with a legend then you can probably:
- remove the associated GlyphRenderer from
.renderers
- delete the corresponding
LegendItem
from the Legend
There is an open issue to discuss making legend items hide-able.
What is your actual concern with “reloading the figure”? Have you actually tested or benchmarked that doing the simplest thing and just deleting the old plot entirely and adding a new one is not sufficient? Is it because your data is large? In that case you could add a new hidden plot that shares the data same sources, then only the non-data parts would need to be sent.