Picking after a subplot geometry change

Hi,

I have a canvas with two subplots on it and the user can pick curves on each subplot (all lines are pickable). I have created the ability to hide one subplot and only show one of the two. The remaining subplot is also enlarged to fit the canvas. This is done using:

self.subplot1.set_visible(True)

self.subplot2.set_visible(False)

self.subplot1.change_geometry(1,1,1)

self.canvas.draw()

However, when I do that, its only possible to pick curves in the area where the original subplot was located… like it hasn’t updated the geometry for picking feature.

Is there a way for me to do this?

Thanks,

Soren