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 Commenti

Have you tried using logical indexing to remove them or create a new array with values lower than the yellow curve?
Rivu
Rivu il 26 Lug 2023
Modificato: Rivu il 26 Lug 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.
Do the indexing for the y values not the x values.
Here xi2 is in the y axis. I dont understand , please suggest something else.
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)
I have drawn the curved yellow line over the curve just to make it more obvious as to what is needed
@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 il 26 Lug 2023
Modificato: Rivu il 26 Lug 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.
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).

Accedi per commentare.

Risposte (0)

Prodotti

Tag

Richiesto:

il 26 Lug 2023

Commentato:

dpb
il 27 Lug 2023

Community Treasure Hunt

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

Start Hunting!

Translated by