save live plots into internal datastructure
fd606522 introduces the saving of live plots onto a list attached to a runner.
Instead of modifying the runner itself, we could instead store a mapping adaptive.active_plots
that keeps
the tasks around. This would be populated by adaptive.live_plot
, which could take an optional parameter, name
, that would be a key into this mapping
(we maintain a pool of names plot_n
for when name
is not given explicitly). If a second plot gets created with
the same name, then the updating task for the previous plot of the same name gets stopped and removed from the mapping.
This would prevent the "I executed the plotting cell twice and now can't stop the plots" problem. If a name
was given, then the previous updating tasks
are stopped automatically, otherwise the user has to manually find the plots in adaptive.active_plots
and stop them.