I have 2 lists of numbers, one called xVar
and the other called yVar
. I will use these 2 elements to plot X and Y values on a graph. They both have the same number of elements.
Normally, I would just plot
ax.scatter(xVar,yVar,s=2,color='tomato');
I want to remove data from yVar
that are over a certain value, for example all data that have a yVar
value over 100
, but I also want to remove the associated xVar
value. Can somebody suggest a way to create 2 new variables that remove all values in yVar
over 100
and the xVar
values associated with them? Then I can just substitute xVar
& yVar
in my plotting line to the new variables.
Thanks again All,