       start_y = y
 
 
-    #width = can_ctx.measureText("blahblah").width
     text_height = 20
 
     legend_height = text_height * @model.get('legends').length

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

  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'))
    range = data_range.get('end') - data_range.get('start')
    x_scale = @mapper.get('scalestate')[0]
    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 = []
    can_ctx.clearRect(0, 0,  @plot_view.viewstate.get('width'),
      @plot_view.viewstate.get('height'))
    while current_tick <= last_tick
