I am creating plots that have different backend data so I need to recreate the data source.
Right now I am replacing the plot in the layout each time using a pattern similar to what I
see in the autompg example, that is, something like
layout.children[-1] = newplot()
my question is … do I need to do anything to “destroy” the old plot or clean up in any way?
The plot has some line glyphs, tools and a legend.
Does all that get “cleaned up” automatically?
I suppose I could use select on the document to find the plot and delete it if that is
either necessary or best practice.