         @ctx.font = '10pt Arial'
         @ctx.textAlign = 'center'
         @ctx.fillStyle = textColor
-        @ctx.fillText( tickPos, @toCanvasXCoord(tickPos), @canvas.height - textSpacing )
+        @ctx.fillText( tick, @toCanvasXCoord(tick), @canvas.height - textSpacing )
 
   drawYTickMarks: (yMin, yMax, nIntervals) ->
     console.log 'yLimits: [',yMin,',',yMax,']'

    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()

    # lightcurve on top of tickmarks?
    # @drawYTickMarks([0..20], [0..@canvas.height], 1, 2)
    # console.log 'LIMITS: [',xMin,',',xMax,']' 
    # @drawXTickMarks(xMin, xMax)
    @drawYTickMarks(yMin, yMax)
    
    # plot points
