anchor.diff:    return obj;
   }
   
  -/*  Create the Parallel Coordinates data structure: Array of Objects of length 0...#cr
  - where parcoord_data[row_i][col_name] = value */
  +
  +/* set up heat map data such that heatmap_data[row_i] = { col_label: .., row_label: .., row: .., col: .., value: ..}
  + Note: the way d3_heatmap was programmed, it's easier to set up the cumulative rows from here. because  data.row will be accessed
  + */
  +
  +function init_heatmap_row(obj, w, s, r, opt) {
  +  sheet_obj = obj["workbook"][w]["sheet"][s];
  +  if (r != opt.col_labels) {
  +    if (sheet_obj.rows.row[r].cell.length > 0) {
  +      //opt.pc_data[opt.cr] = {}; //object initialization
  +      for (var c = 0; c < sheet_obj.rows.row[r].cell.length; c++) {
  +        var col_i = sheet_obj.rows.row[r].cell[c]["@column_alpha"];
  +        (opt.hm_data).push({
  +          row_label: sheet_obj.rows.row[r].cell[opt.row_labels]["#text"],
  +          col_label: opt.columns[col_i],
  +          sheet: sheet_obj["@name"],
  +          row: opt.cr, //sheet_arr[s].rows.row[r]["@index"],
  +          col: sheet_obj.rows.row[r].cell[c]["@column"],
  +          col_alpha: sheet_obj.rows.row[r].cell[c]["@column_alpha"],
  +          value: sheet_obj.rows.row[r].cell[c]["#text"]
  +        });
  +      }
  +      //if at least one cell in the row was not empty, advance cumulative row counter
  +      if (Object.keys(opt.hm_data[opt.cr]).length != 0)
  +        opt.cr++;
  +    }
  +  }
  +  return obj;
  +}
  +
  +/* Set up parallel coordinates data, Array of Objects of length 0...#cr, such that
  + parcoord_data[row_i][col_name] =  (parcoords_data[row_i] = {c1: v1, c2: v2 ...} )
  + TO DO handle zero selections
  + */
  +
   function init_pc_row(obj, w, s, r, opt) {
     //console.log("init pc row s, r: ", s, r);
     sheet_obj = obj["workbook"][w]["sheet"][s];
  
positive.code: }
  
  function heatmap_plot(){
      var options = {cr: 0, hm_data: [], row_labels: 0, col_labels: 0};
      var selected_json = get_data(rb=options.row_labels, cb=options.col_labels);
      iterate_on_rows(selected_json, init_heatmap_row, null, options);
      var heatmap_data = init_heatmap_data(selected_json); //plotting_selected_cells();
      draw_heatmap(heatmap_data);
    //draw_heatmap(options.hm_data);
      $j('#heatmap_container').show();
      doUpdate();
  }
  
  function reset_on_sheet(obj, w, s, opt) {
     console.log("reset on sheet s: ", s)
     opt.columns = {};
     return obj;
  }
  
  function parallel_coord_plot(){
      var options = {cr: 0, pc_data: [], columns: {}, col_labels: 0, row_labels: -1};  // cr = cumulative rows across workbooks/sheets
      var selected_json = get_data(rb=options.row_labels, cb=options.col_labels);
      iterate_on_rows(selected_json, init_pc_row, add_pc_titles_from_sheet, options);
      draw_parallel_coord(options.pc_data);
      $j('#parcoords_container').show();
      //doUpdate();
  }
  
  /* Set up parallel coordinates data such that
     parcoord_data[row_i][col_name] =  (parcoords_data[row_i] = {c1: v1, c2: v2 ...} )
     TO DO handle zero selections
  */
  
  function add_pc_titles_from_sheet(obj, w, s, opt) {
    var sheet_obj = obj["workbook"][w]["sheet"][s];
    opt.columns = {};
    var cb = opt.col_labels;
  
negative.code: 
  }
  */
  
  /* Fetch XML --> convert to JSON --> add "selected" attribute to selected cells.
    - currently wb=0, because we only have one workbook each time. later when we combine different files, this should be changed.
  