Interactivly update figure by clicking on the figure plane

I am tying to write a script with python ploty which enable user to click on a figure and using the coordinates of the click (x, y), figure will be updated by triggering a function and plotting a curve. Something like pplane in Matlab or javascript.

This is supported in plotly python?
Thanks in advance for any guide.