       yscale.domain(ylim)
             .range([height, margin.inner])
 
+      # if yticks not provided, use nyticks to choose pretty ones
       if yticks == null
         yticks = yscale.ticks(nyticks)
 
       # reorganize lod,pos by chromosomes
       data = reorgData(data, lodvarname)
       
-      # chromosome scales
+      # add chromosome scales (for x-axis)
       data = chrscales(data, width, chrGap)
       xscale = data.xscale
 

    w = Math.round((width-chrGap*data.chrnames.length)/totalChrLength*chrLength[i])
    data.chrEnd.push(cur + w)
    cur = data.chrEnd[i] + chrGap
    data.xscale[chr] = d3.scale.linear()
                         .domain([chrStart[i], chrEnd[i]])
                         .range([data.chrStart[i], data.chrEnd[i]])

  data

       .attr("stroke-width", "none")

  ## configuration parameters
  chart.width = (value) ->
    if !arguments.length
      return width
