     textColor = '#323232'
     textSpacing = 15
 
-    for tickPos, i in [xTicks...]
+    for tick, i in [xTicks...]
       continue if i is 0 # skip first value
       # draw ticks
       @ctx.beginPath() 
-      @ctx.moveTo( @toCanvasXCoord(tickPos), @canvas.height )
+      @ctx.moveTo( @toCanvasXCoord(tick), @canvas.height )
       if i % nIntervals is 0
-        @ctx.lineTo( @toCanvasXCoord(tickPos), @canvas.height - tickMajorLength ) # major tick
+        @ctx.lineTo( @toCanvasXCoord(tick), @canvas.height - tickMajorLength ) # major tick
       else
-        @ctx.lineTo( @toCanvasXCoord(tickPos), @canvas.height - tickMinorLength ) # minor tick
+        @ctx.lineTo( @toCanvasXCoord(tick), @canvas.height - tickMinorLength ) # minor tick
       @ctx.lineWidth = tickWidth
       @ctx.strokeStyle = tickColor
       @ctx.stroke()

    textColor = '#323232'
    textSpacing = 15

    for tickPos, i in [yTicks...]
      continue if i is 0 # skip first value
      # draw ticks
      @ctx.beginPath() 
      @ctx.moveTo( 0, @toCanvasYCoord(tickPos) )
      if i % nIntervals is 0
        @ctx.lineTo( tickMajorLength, @toCanvasYCoord(tickPos) ) # major tick
      else
        @ctx.lineTo( tickMinorLength, @toCanvasYCoord(tickPos) ) # minor tick
      @ctx.lineWidth = tickWidth
      @ctx.strokeStyle = tickColor
      @ctx.stroke()

        @ctx.font = '10pt Arial'
        @ctx.textAlign = 'center'
        @ctx.fillStyle = textColor
        @ctx.fillText( tick, @toCanvasXCoord(tick), @canvas.height - textSpacing )

  drawYTickMarks: (yMin, yMax, nIntervals) ->
    console.log 'yLimits: [',yMin,',',yMax,']'
