Exclude a portion from a scatter plot

Can someone please suggest an efficient way to remove the more red part which is lying on the outer side of the yellow curve ?
This is a Xi2 vs Rigidity distribution (scatter plot) for some events. The axes are in log scale.
I need to introduce a function in this scatter plot to remove the outer yellow part from the whole plot.

9 comentarios

Dyuman Joshi
Dyuman Joshi el 26 de Jul. de 2023
Have you tried using logical indexing to remove them or create a new array with values lower than the yellow curve?
Rivu
Rivu el 26 de Jul. de 2023
Editada: Rivu el 26 de Jul. de 2023
Yes , but there are two main issues :
like if in the values I give xi2 < 1000 , a horizontal cut will be there and then some major portion of the blue dots (the good ones) gets excluded too. Which I do not want. I cant understand how to introduce a curve like that one in matlab and exclude the portion.
Dyuman Joshi
Dyuman Joshi el 26 de Jul. de 2023
Do the indexing for the y values not the x values.
Rivu
Rivu el 26 de Jul. de 2023
Here xi2 is in the y axis. I dont understand , please suggest something else.
Dyuman Joshi
Dyuman Joshi el 26 de Jul. de 2023
How do you get the yellow line?
Can you attach the data for all 3 sets of points? (Red and blue points and yellow line)
Rivu
Rivu el 26 de Jul. de 2023
I have drawn the curved yellow line over the curve just to make it more obvious as to what is needed
dpb
dpb el 26 de Jul. de 2023
@Rivu, as others have already noted, without the data and the logic behind what are red and blue and what defines the yellow line location, nobody can do anything at all specific towards solving your problem.
The general solution has already been given, use logical addressing, but without something to work with, specifics aren't possible and it's expecting too much of the volunteers here to have them also have to make up illustrative datasets for fairly complicated problem for you..."help us help you!"
Rivu
Rivu el 26 de Jul. de 2023
Editada: Rivu el 26 de Jul. de 2023
Okay, I apologise for the less information provided.
Here is the brief description of what the plot is : Using matlab , a selection criteria has been developed to distinguish between anti particles and particles. A data is generated when the program is processed. The data contains information about the Rigidity , DeDx , beta (velocity), xi2 etc of the particular particle.
An instance is depicted in the snap below ;
From the data obtained , the values are plotted in a scatter plot to visualize the distribution of Xi2 as a function of Rigidity(Rig) . The x and y axis have been plotted in log scale .
Here blue dots are values of particles and red dots are absolute values of antiparticles.
Now the main objective is to introduce a function in the code so as to exclude most of the antiparticles. From the plot it is observed that 97% of the antiparticles allign in the exterior diagonal portion of the distribution. So with that yellow line (which I have painted afterwards), I wanted to refer to the part of the plot which I want to exclude.
Therefore in a sentence , I want a suggestion as to how to exclude a diagonal portion of a log log scatter plot using Matlab.
I hope I was able to make some sense.
dpb
dpb el 27 de Jul. de 2023
Attach a .mat file with the data, not just images; nothing can be done with them but look...even better would be to add the code to generate the present figure (w/o the line is ok).

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Productos

Etiquetas

Preguntada:

el 26 de Jul. de 2023

Comentada:

dpb
el 27 de Jul. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by