     for i in [0...@dataLength]
       if i % tickMinorInterval is 0 and i isnt 0
         tick_x = ((+i - xMin) / (xMax - xMin)) * @canvas.width
+        # top tickmarks
         @ctx.beginPath()
         @ctx.moveTo(tick_x,0)
         @ctx.lineTo(tick_x,tickMinorLength)

        @ctx.strokeStyle = tickColor
        @ctx.stroke()

      if i % tickMajorInterval is 0 and i isnt 0
        tick_x = ((+i - xMin) / (xMax - xMin)) * @canvas.width
        @ctx.font = '10pt Arial'

        @ctx.fillStyle = textColor
        @ctx.fillText(i,tick_x,tickMajorLength+5)

        tick_x = ((+i - xMin) / (xMax - xMin)) * @canvas.width
        @ctx.font = '10pt Arial'
        @ctx.textAlign = 'center'
        @ctx.fillStyle = textColor
        @ctx.fillText( i, tick_x, @canvas.height - tickMajorLength+5 )

    for i in [0...@dataLength]
      x = ((+@data.x[i] - xMin) / (xMax - xMin)) * @canvas.width
      # y = ((+@data.y[i] - @largestY) / (@smallestY - @largestY)) * @canvas.height
      y = +@data.y[i] * @canvas.height# - @canvas.height
      y=-y+@canvas.height
      @ctx.fillStyle = "#fff"
      @ctx.fillRect(x,y,2,2)

