fix scatter plot still being active when a legend item is removed