Changing the colour of data points on a graph that satisfy a certain criteria
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
So i basically calculate a probability and for data points that have a probability of say 0.8 i want to change the colour on the graph, what function do i use to do this? i have tried using the set function but dont seem to be able to get it to work
0 Commenti
Risposte (1)
bym
il 3 Nov 2012
There are many ways of doing this. Here is one
clear;clc
x = rand(2000,1);
y = rand(2000,1);
c = hypot(x -.5,sqrt(y)-1.25*y) > .2;
plot(x(c),y(c),'b.',x(~c),y(~c),'r*')
axis square
Vedere anche
Categorie
Scopri di più su Signal Generation and Preprocessing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!