I have a large data matrix with 5 columns. 5th column contains many zeros. I want to do scatter(data(:,4),data(:,5)) and set a different color for points/rows where value in 5th column is zero.
I will then draw scatter plot of different columns but with same condition i.e. different color where values in 5th column are zeros.
You can easily set the different color-flag as a fourth parameter in a function:
Here
d(:,4)andd(:,5)are the coordinates of points,7is the size of the point, andd(:,5)==0is the color-flag (for different values ofd(:,5), different colors are chosen).