public void draw() {
    p.pushMatrix();
    p.pushStyle();
    p.fill(100, 100, 0);
    p.rect(0, 0, width, height);
    //  p.scale((float)ppHor, (float)ppVert);
    // p.translate(x, y);
    // p.sca
    // p.stroke(0);
    // p.strokeWeight(1.0f);
    p.noStroke();
    p.rectMode(PApplet.CORNER);

    // p.line(0, 0, 100, 100);

    // TODO: block on datset change here.
    if (d.getNumDatapoints() > minInd) {
      int which = 0;
      int i = minInd;
      for (; (i <= maxInd && i < d.getNumDatapoints()); i++) {
        Double v = d.getParam(i, myId);
        if (!v.isNaN()) {
          if (i >= minSelected && i <= maxSelected) {
            // p.stroke(0, 0, 256);
            p.noStroke();
            p.fill(hues[(int) d.getParam(i, myId)], 150, 256);
          } else {
            p.noStroke();
            p.fill(hues[(int) d.getParam(i, myId)], 256, 256);
          }
        } else {
          if (i >= minSelected && i <= maxSelected) {
            // p.stroke(0, 0, 256);
            p.noStroke();
            p.fill(200);
          } else {
            p.noStroke();
            p.fill(0);
          }
        }
        p.rect((ppHor * which++), 0, ppHor, height);
      }
    }

    p.popStyle();
    p.popMatrix();
  }