<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -15,23 +15,26 @@ Raphael.fn.g.scatterplot = function (x, y, width, height, valuesx, valuesy, opts
     }
     var allx = Array.prototype.concat.apply([], valuesx),
         ally = Array.prototype.concat.apply([], valuesy),
-        xdim = this.g.snapEnds(Math.min.apply(Math, allx), Math.max.apply(Math, allx), valuesx[0].length - 1),
-        minx = xdim.from,
-        maxx = xdim.to,
-        gutter = opts.gutter || 10,
-        kx = (width - gutter * 2) / (maxx - minx),
-        ydim = this.g.snapEnds(Math.min.apply(Math, ally), Math.max.apply(Math, ally), valuesy[0].length - 1),
-        miny = ydim.from,
-        maxy = ydim.to,
-        ky = (height - gutter * 2) / (maxy - miny),
         len = Math.max(valuesx[0].length, valuesy[0].length),
-        symbol = opts.symbol || &quot;&quot;,
+        symbol = opts.symbol || &quot;o&quot;,
         colors = opts.colors || Raphael.fn.g.colors,
         that = this,
         columns = null,
         dots = null,
         chart = this.set(),
         path = [],
+        minall = Math.min(Math.min.apply(Math, allx), Math.min.apply(Math, ally)),
+        maxall = Math.max(Math.max.apply(Math, allx), Math.max.apply(Math, ally)),
+        ///XXX: probably breaks if valuesx.length != valuesy.length. FIXME
+        //XXX: always sets the two axes to the same values
+        xdim = ydim = this.g.snapEnds(minall, maxall, valuesx[0].length - 1),
+        minx = xdim.from,
+        maxx = xdim.to,
+        gutter = opts.gutter || 10,
+        kx = (width - gutter * 2) / (maxx - minx),
+        miny = ydim.from,
+        maxy = ydim.to,
+        ky = (height - gutter * 2) / (maxy - miny),
         axminx = opts.axminx || minx,
         axmaxx = opts.axmaxx || maxx,
         axminy = opts.axminy || miny,
@@ -49,79 +52,28 @@ Raphael.fn.g.scatterplot = function (x, y, width, height, valuesx, valuesy, opts
     var axis = this.set();
     if (opts.axis) {
         var ax = (opts.axis + &quot;&quot;).split(/[,\s]+/);
-        +ax[0] &amp;&amp; axis.push(this.g.axis(x + gutter, y + gutter, width - 2 * gutter, axminx, axmaxx, opts.axisxstep || Math.floor((width - 2 * gutter) / 20), 2));
+        +ax[0] &amp;&amp; axis.push(this.g.axis(x + gutter, y + gutter, width - 2 * gutter, minx, maxx, opts.axisxstep || Math.floor((width - 2 * gutter) / 20), 2));
         +ax[1] &amp;&amp; axis.push(this.g.axis(x + width - gutter, y + height - gutter, height - 2 * gutter, axminy, axmaxy, opts.axisystep || Math.floor((height - 2 * gutter) / 20), 3));
         +ax[2] &amp;&amp; axis.push(this.g.axis(x + gutter, y + height - gutter, width - 2 * gutter, axminx, axmaxx, opts.axisxstep || Math.floor((width - 2 * gutter) / 20), 0));
         +ax[3] &amp;&amp; axis.push(this.g.axis(x + gutter, y + height - gutter, height - 2 * gutter, axminy, axmaxy, opts.axisystep || Math.floor((height - 2 * gutter) / 20), 1));
     }
-    var lines = this.set(),
-        symbols = this.set(),
-        line;
+    var symbols = this.set();
     for (var i = 0, ii = valuesy.length; i &lt; ii; i++) {
-        if (!opts.nostroke) {
-            lines.push(line = this.path().attr({
-                stroke: colors[i],
-                &quot;stroke-width&quot;: opts.width || 2,
-                &quot;stroke-linejoin&quot;: &quot;round&quot;,
-                &quot;stroke-linecap&quot;: &quot;round&quot;,
-                &quot;stroke-dasharray&quot;: opts.dash || &quot;&quot;
-            }));
-        }
         var sym = this.raphael.is(symbol, &quot;array&quot;) ? symbol[i] : symbol,
             symset = this.set();
         path = [];
         for (var j = 0, jj = valuesy[i].length; j &lt; jj; j++) {
             var X = x + gutter + ((valuesx[i] || valuesx[0])[j] - minx) * kx;
             var Y = y + height - gutter - (valuesy[i][j] - miny) * ky;
-            (Raphael.is(sym, &quot;array&quot;) ? sym[j] : sym) &amp;&amp; symset.push(this.g[Raphael.fn.g.markers[this.raphael.is(sym, &quot;array&quot;) ? sym[j] : sym]](X, Y, (opts.width || 2) * 3).attr({fill: colors[i], stroke: &quot;none&quot;}));
+            (Raphael.is(sym, &quot;array&quot;) ? sym[j] : sym) &amp;&amp; symset.push(this.g[Raphael.fn.g.markers[this.raphael.is(sym, &quot;array&quot;) ? sym[j] : sym]](X, Y, (opts.width || 2)).attr({fill: colors[i], stroke: &quot;none&quot;}));
             path = path.concat([j ? &quot;L&quot; : &quot;M&quot;, X, Y]);
         }
         symbols.push(symset);
         if (opts.shade) {
             shades[i].attr({path: path.concat([&quot;L&quot;, X, y + height - gutter, &quot;L&quot;,  x + gutter + ((valuesx[i] || valuesx[0])[0] - minx) * kx, y + height - gutter, &quot;z&quot;]).join(&quot;,&quot;)});
         }
-        !opts.nostroke &amp;&amp; line.attr({path: path.join(&quot;,&quot;)});
-    }
-    function createColumns(f) {
-        // unite Xs together
-        var Xs = [];
-        for (var i = 0, ii = valuesx.length; i &lt; ii; i++) {
-            Xs = Xs.concat(valuesx[i]);
-        }
-        Xs.sort();
-        // remove duplicates
-        var Xs2 = [],
-            xs = [];
-        for (var i = 0, ii = Xs.length; i &lt; ii; i++) {
-            Xs[i] != Xs[i - 1] &amp;&amp; Xs2.push(Xs[i]) &amp;&amp; xs.push(x + gutter + (Xs[i] - minx) * kx);
-        }
-        Xs = Xs2;
-        ii = Xs.length;
-        var cvrs = f || that.set();
-        for (var i = 0; i &lt; ii; i++) {
-            var X = xs[i] - (xs[i] - (xs[i - 1] || x)) / 2,
-                w = ((xs[i + 1] || x + width) - xs[i]) / 2 + (xs[i] - (xs[i - 1] || x)) / 2,
-                C;
-            f ? (C = {}) : cvrs.push(C = that.rect(X - 1, y, Math.max(w + 1, 1), height).attr({stroke: &quot;none&quot;, fill: &quot;#000&quot;, opacity: 0}));
-            C.values = [];
-            C.symbols = that.set();
-            C.y = [];
-            C.x = xs[i];
-            C.axis = Xs[i];
-            for (var j = 0, jj = valuesy.length; j &lt; jj; j++) {
-                Xs2 = valuesx[j] || valuesx[0];
-                for (var k = 0, kk = Xs2.length; k &lt; kk; k++) {
-                    if (Xs2[k] == Xs[i]) {
-                        C.values.push(valuesy[j][k]);
-                        C.y.push(y + height - gutter - (valuesy[j][k] - miny) * ky);
-                        C.symbols.push(chart.symbols[j][k]);
-                    }
-                }
-            }
-            f &amp;&amp; f.call(C);
-        }
-        !f &amp;&amp; (columns = cvrs);
     }
+
     function createDots(f) {
         var cvrs = f || that.set(),
             C;
@@ -134,7 +86,6 @@ Raphael.fn.g.scatterplot = function (x, y, width, height, valuesx, valuesy, opts
                 C.x = X;
                 C.y = Y;
                 C.value = valuesy[i][j];
-                C.line = chart.lines[i];
                 C.shade = chart.shades[i];
                 C.symbol = chart.symbols[i][j];
                 C.symbols = chart.symbols[i];
@@ -144,36 +95,10 @@ Raphael.fn.g.scatterplot = function (x, y, width, height, valuesx, valuesy, opts
         }
         !f &amp;&amp; (dots = cvrs);
     }
-    chart.push(lines, shades, symbols, axis, columns, dots);
-    chart.lines = lines;
+    chart.push(shades, symbols, axis, columns, dots);
     chart.shades = shades;
     chart.symbols = symbols;
     chart.axis = axis;
-    chart.hoverColumn = function (fin, fout) {
-        !columns &amp;&amp; createColumns();
-        columns.mouseover(fin).mouseout(fout);
-        return this;
-    };
-    chart.clickColumn = function (f) {
-        !columns &amp;&amp; createColumns();
-        columns.click(f);
-        return this;
-    };
-    chart.hrefColumn = function (cols) {
-        var hrefs = that.raphael.is(arguments[0], &quot;array&quot;) ? arguments[0] : arguments;
-        if (!(arguments.length - 1) &amp;&amp; typeof cols == &quot;object&quot;) {
-            for (var x in cols) {
-                for (var i = 0, ii = columns.length; i &lt; ii; i++) if (columns[i].axis == x) {
-                    columns[i].attr(&quot;href&quot;, cols[x]);
-                }
-            }
-        }
-        !columns &amp;&amp; createColumns();
-        for (var i = 0, ii = hrefs.length; i &lt; ii; i++) {
-            columns[i] &amp;&amp; columns[i].attr(&quot;href&quot;, hrefs[i]);
-        }
-        return this;
-    };
     chart.hover = function (fin, fout) {
         !dots &amp;&amp; createDots();
         dots.mouseover(fin).mouseout(fout);</diff>
      <filename>g.raphael/g.scatter.js</filename>
    </modified>
    <modified>
      <diff>@@ -69,6 +69,12 @@ function sh(values, dim) {
 /* TODO DELETEME DEBUGGING XXX */
 
 function gaussian_dist_sanity_check(canvas) {
+    //some interesting variance matrices:
+    // [[1,0],[0,1]]      #even scatter
+    // [[20,0],[0,1]]     #squished horizontally
+    // [[1,0],[0,20]]     #squished vertically
+    // [[2,-1],[-2,1]]    #diagonal left
+    // [[2,1],[-2,1]]     #diagonal right
     var weight = eval($(&quot;#weight&quot;).val());
     var mus = eval($(&quot;#mus&quot;).val());
     var vars = eval($(&quot;#vars&quot;).val());
@@ -84,8 +90,7 @@ function gaussian_dist_sanity_check(canvas) {
 
     r.remove();
     r = Raphael(&quot;gaussian&quot;, 500, 500);
-    opts = {nostroke: true, axis: &quot;0 0 1 1&quot;, symbol: &quot;o&quot;}
-            //axminx: .8, axmaxx: 1.2, axminy: .8, axmaxy: 1.2};
+    opts = {}//{axis: &quot;0 0 1 1&quot;}
     r.g.scatterplot(40,0,400,400, xs, ys, opts);
 }
 </diff>
      <filename>gmm/test.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fa39ff9f313d576c39a9b0e683a406ea8a5bca1b</id>
    </parent>
  </parents>
  <author>
    <name>Bill Mill</name>
    <email>bill.mill@gmail.com</email>
  </author>
  <url>http://github.com/llimllib/grabcut_js/commit/fa689a3a257807a9d1e3119c836fc7223dfe6ba1</url>
  <id>fa689a3a257807a9d1e3119c836fc7223dfe6ba1</id>
  <committed-date>2009-11-06T19:04:21-08:00</committed-date>
  <authored-date>2009-11-06T19:04:21-08:00</authored-date>
  <message>have a somewhat working scatterplot... need to figure the axes out better</message>
  <tree>0cfb311b40cbb05ca35e558e78d071a452f1e707</tree>
  <committer>
    <name>Bill Mill</name>
    <email>bill.mill@gmail.com</email>
  </committer>
</commit>
