I have a data with three columns X, Y and T. X and Y represents positions of and event and T the corresponding time. What I did is, i have the following code to eliminate the events with (0,0) positions (X,Y), plot the histogram and plot (X,Y).
A=[X Y T];
A(any(A==0,2),:)=[];
figure(1)
[k,n]=hist(A(:,3)./1000,100);
plot(n,k,'*r')
figure(2)
plot(A(:,1),A(:,2),'.','markersize',12).
This is what I have. I want help in following:
I want to choose some regions from the XY plot (figure 2), eliminate those events from A (X,Y and T) and then plot the histogram of T, plot (X,Y).
Please give me code to do this.
PS: To make clear, my aim is to eliminate some unwanted events (using the mouse, selecting the regions with circles or rectangles by mouse click). So, first I plot the real data. Then choose from the XY plots the unwanted events (using mouse). Then eliminate those events from the original file and plot histogram and XY plot.
If it is not possible to choose different regions with separate circles or rectangles, I think, it can be done with some loop which repeat only if I say "Yes" or some number (1 for yes and 0 for No). so this may allow me to repeat the removing the regions up to the extend I want. Please tell me how can I make this loop in case of multiple region selection at a time is not possible.