   tick_label : (tick) ->
     return tick.toString()
 
+
   render_x : ->
     can_ctx = @plot_view.x_can_ctx
     data_range = @mapper.data_range
     interval = ticks.auto_interval(
-      data_range.get('start'), data_range.get('end')
-    )
+      data_range.get('start'), data_range.get('end'))
     range = data_range.get('end') - data_range.get('start')
     x_scale = @mapper.get('scalestate')[0]
-    last_tick_end = 10000
+    last_tick_end = 0
     [first_tick, last_tick] = ticks.auto_bounds(
       data_range.get('start'), data_range.get('end'), interval)
     current_tick = first_tick
     x_ticks = []
-    last_tick_end = 0
     can_ctx.clearRect(0, 0,  @plot_view.viewstate.get('width'),
       @plot_view.viewstate.get('height'))
     while current_tick <= last_tick

      data_range.get('start'), data_range.get('end'))
    range = data_range.get('end') - data_range.get('start')
    y_scale = @mapper.get('scalestate')[0]
    [first_tick, last_tick] = ticks.auto_bounds(
      data_range.get('start'), data_range.get('end'), interval)
    current_tick = first_tick
    y_ticks = []
    last_tick_end = 10000
    can_ctx.clearRect(0, 0, @plot_view.viewstate.get('width'),
      @plot_view.viewstate.get('height'))
    while current_tick <= last_tick

      console.log("l.name", l.name, l, legend_offset_x, legend_offset_y)
      can_ctx.strokeStyle = l.color
      can_ctx.fillStyle = l.color
      can_ctx.fillText(l.name, legend_offset_x, legend_offset_y)
      legend_offset_y += text_height
    can_ctx.stroke()
