                .attr("y", -pad.top*0.75)
                .attr("text-anchor", "middle")
                .attr("dominant-baseline", "middle")
-               .attr("fill", [darkBlue, darkRed][j])
+               .attr("fill", [darkRed, darkBlue][j])
 
     for j in [2..3]
       panels[i][j].append("text").attr("id", "mptitle#{i}#{j}")

      pcurves.append("path")
             .datum(data.p)
             .attr("d", pCurve(mindex, chr, data.nll))
             .attr("stroke", darkBlue)
             .attr("fill", "none")
             .attr("stroke-width", "2")
      pcurves.append("path")
             .datum(data.p)
             .attr("d", pCurve(mindex, chr, data.kll))
             .attr("stroke", darkRed)
             .attr("fill", "none")
             .attr("stroke-width", "2")


      mcurves.append("path")
             .datum(data.m[0...data.nll[chr].length])
             .attr("d", mCurve(pindex, chr, data.nll))
             .attr("stroke", darkRed)
             .attr("fill", "none")
             .attr("stroke-width", "2")
      mcurves.append("path")
             .datum(data.m[0...data.nll[chr].length])
             .attr("d", mCurve(pindex, chr, data.kll))
             .attr("stroke", darkBlue)
             .attr("fill", "none")
             .attr("stroke-width", "2")

