How can I interactively select or remove points from a plot?

Hi,
I would like to normalize a stellar spectrum with MatLab. Basically it is just a spline interpolation of some selected points in the spectrum array, but I would like to do this interactively, i.e. by selecting and removing points by hand in the plot of the unnormalized spectrum. An example of what I would like to do is shown in the attached video, taken from the python script RASSINE (Cretigner 2020). The script lets you select or remove the points for the spline interpolation and updates the continuum every time.
I tried to use ginput or getpts, but the main problem is that I cannot remove points once I added them. In this case, if the spline fit with the chosen points is wrong, I can't modify it anymore. Another problem, which I partially solved, is that I cannot zoom or pan when using these functions.
Thanks in advance.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Splines에 대해 자세히 알아보기

제품

릴리스

R2021a

태그

질문:

2022년 3월 30일

댓글:

2022년 3월 30일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by