   # add black border
   svg.append("rect")
       .attr("class", "border")
-      .attr("width", width)
+      .attr("width", lwidth)
       .attr("height", height)
+
+  # black border on right top
+  svg.append("rect")
+      .attr("class", "border")
+      .attr("x", xrscale(0))
+      .attr("y", yrtscale(100))
+      .attr("width", rwidth)
+      .attr("height", rtheight)
+
+  # black border on right bottom
+  svg.append("rect")
+      .attr("class", "border")
+      .attr("x", xrscale(0))
+      .attr("y", yrbscale(100))
+      .attr("width", rwidth)
+      .attr("height", rbheight)
 
   # add horizontal lines at chromosome boundaries
   svg.selectAll("#hchr")

      .attr("height", yscale.rangeBand())
      .attr("id", (d) -> "r#{d.row}c#{d.col}")
      .style("fill", (d) -> zscale(d.value))

  cells.on("mouseover", (d) -> mouseover(d))


# plot recombination fractions/LOD scores for all pairs of chromosomes

margin = {top: 25, right: 25, bottom: 10, left:50}
lwidth = 720
height = 720
rwidth = 400
zmax = 12 # maximum LOD score

log2 = (x) -> Math.log(x)/Math.log(2.0)
