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

6 vues (au cours des 30 derniers jours)
Antonio Armeni
Antonio Armeni le 30 Mar 2022
Commenté : Walter Roberson le 30 Mar 2022
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.

Réponses (0)

Catégories

En savoir plus sur Splines dans Help Center et File Exchange

Tags

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by