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

10 visualizaciones (últimos 30 días)
Antonio Armeni
Antonio Armeni el 30 de Mzo. de 2022
Comentada: Walter Roberson el 30 de Mzo. de 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.

Respuestas (0)

Categorías

Más información sobre Splines en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by