Answer is provided, looking at this question
CodePudding user response:
I figured out how to get a new figure to plot. All it requires are unique names in on_pick
, not just plt
, for the figure and axes.
def on_pick(event):
my_fig, my_ax = plt.subplots() # New plot with unique name
my_ax.scatter([1, 2, 3, 4], [5, 6, 7, 8]) # Make the scatterplot
my_fig.show() # Show the plot