Delete Points from Graph

Dear All,

I have a set of graphs that I generate automatically each displaying XY data in the form of a curve containing peaks.
My main interest for the time being is to delete the peaks and look at the baseline.

I have attempted to use Delete Marquee Points and it works fine, but there are several peaks in a curve and I have many curves so the process is rather tedious. In Delete XY Points we have to draw a ROI which takes even more time.

Since the peaks have roughly the same width, I believe it should be fairly easy to click on the graph and for that point apply a pre-defined window size (or range in the X-axis) that would immediately delete the points within range. Later I would also like to use the code not to delete the peaks but to generate another wave where properties of the peaks selected can be studied.

I have no experience in writing scripts that interact with graphs, can anyone give me a few pointers on where to start? Maybe some snippets where I can have a look at the main functions, structure that I could adapt to my case?

Many thanks!!

R.