annotate rDiff/src/locfit/m/plotbyfactor.m @ 3:29a698dc5c7e default tip

Merge multiple heads.
author Dave Bouvier <dave@bx.psu.edu>
date Mon, 27 Jan 2014 14:15:36 -0500
parents 0f80a5141704
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
1 function plotbyfactor(x,y,f)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
2 %
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
3 % very simplistic version of plotbyfactor.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
4 % no symbols, will crash if more than 8 levels.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
5 %
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
6
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
7 z = unique(f);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
8 cols = ['b','r','g','m','c','y','k','w'];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
9
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
10 for (i = 1:length(z))
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
11 u = find(f==z(i));
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
12 plot(x(u),y(u),'.','color',cols(i));
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
13 hold on;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
14 end;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
15 hold off;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
16
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
17 return;