     "M #{data}"
 
   getPathPoints: ->
-    rangex = 20
-    x0 = if @isExponential() then 1 else 0
+    rangex = 60
+    x0 = if @startAt1() then 1 else 0
     data = _.range(x0,rangex)
     miny = Infinity
     maxy = -Infinity
     data = _.map data, (x) =>
-      scope = {in: x, out: 0, maxIn: rangex}
+      scope = {in: x, out: 0, maxIn: rangex, maxOut: rangex}
       try
         y = math.eval @props.formula, scope
         if y < miny then miny = y

  render: ->
    (div {className: 'svgGraphView'},
      (svg {width: @props.width, height: @props.height},
        @renderLineData()
        @renderAxisLines()
        @renderXLabel()
        @renderYLabel()
      )

  # TODO: This is a hack. We parse the formula.
  # We want to know because it informs how we scale the
  # graph axis
  getYScale: (xrange, yrange) ->
    if @props.formula.indexOf("^") > -1
      yrange
    else if (@props.formula.indexOf("log")  > -1) and (@props.formula.indexOf("maxIn -") is -1)
      yrange * 3
    else
      xrange

  startAt1: ->
    @props.formula.indexOf("log")  > -1

  invertPoint: (point) ->
    {x: point.x, y: @props.height - point.y}
