diff rDiff/src/locfit/m/plotbyfactor.m @ 0:0f80a5141704

version 0.3 uploaded
author vipints
date Thu, 14 Feb 2013 23:38:36 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rDiff/src/locfit/m/plotbyfactor.m	Thu Feb 14 23:38:36 2013 -0500
@@ -0,0 +1,17 @@
+function plotbyfactor(x,y,f)
+%
+% very simplistic version of plotbyfactor.
+% no symbols, will crash if more than 8 levels.
+%
+
+z = unique(f);
+cols = ['b','r','g','m','c','y','k','w'];
+
+for (i = 1:length(z))
+  u = find(f==z(i));
+  plot(x(u),y(u),'.','color',cols(i));
+  hold on;
+end;
+hold off;
+
+return;