 draw = (data) ->
 
   # dimensions of panels
-  w = [800, 800, 300, 300]
-  h = [800, 300, 1100/2, 1100/2]
+  w = [800, 300]
+  h = [w[0], 300]
+  w = [w[0], w[0], w[1], w[1]]
+  h = [h[0], h[1], (h[0]+h[1])/2, (h[0]+h[1])/2]
   pad = {left:60, top:40, right:40, bottom: 40}
 
   left = [pad.left, pad.left,

  totalw = right[2] + pad.right
  totalh = bottom[1] + pad.bottom

  # height of marker ticks in lower-left panel
  tickHeight = (bottom[1] - top[1])*0.02


  pink = "#E9CFEC"
  purple = "#8C4374"

  # calculate X and Y scales, using cM positions
  totalChrLength = 0;
  for c in data.chrnames
    data.chr[c].length_cM = data.chr[c].end_cM - data.chr[c].start_cM
    totalChrLength += data.chr[c].length_cM

  chrXScale = {}
  chrYScale = {}
  curXPixel = left[0]+peakRad
  curYPixel = bottom[0]-peakRad
  for c in data.chrnames
    data.chr[c].length_pixel = Math.round((w[0]-peakRad*2) * data.chr[c].length_cM / totalChrLength)
    data.chr[c].start_Xpixel = curXPixel
    data.chr[c].end_Xpixel = curXPixel + data.chr[c].length_pixel - 1
    data.chr[c].start_Ypixel = curYPixel
    data.chr[c].end_Ypixel = curYPixel - (data.chr[c].length_pixel - 1)

    chrXScale[c] = d3.scale.linear()
                  .domain([data.chr[c].start_cM, data.chr[c].end_cM])
                  .range([data.chr[c].start_Xpixel, data.chr[c].end_Xpixel])
                  .clamp(true)
    chrYScale[c] = d3.scale.linear()
                  .domain([data.chr[c].start_cM, data.chr[c].end_cM])
                  .range([data.chr[c].start_Ypixel, data.chr[c].end_Ypixel])
                  .clamp(true)

    curXPixel += data.chr[c].length_pixel
    curYPixel -= data.chr[c].length_pixel

  # slight adjustments
  top[0] = data.chr["X"].end_Ypixel-peakRad
  right[0] = data.chr["X"].end_Xpixel+peakRad
  w[0] = right[0] - left[0]
  w[0] = bottom[0] - top[0]
  data.chr["1"].start_Xpixel = left[0]
  data.chr["1"].start_Ypixel = bottom[0]
  data.chr["X"].end_Xpixel = right[0]
  data.chr["X"].end_Ypixel = top[0]

  # create SVGs
  svg = d3.select("div#cistrans").append("svg")
          .attr("width", totalw)
