       options = _.extend({},
         spec.options,
         {'el' : @el,
-        'model' : model}
+        'model' : model,
+        'plot_id' : @id}
       )
       view = new model.default_view(options)
       @renderers[view.id] = view;

  map_screen : (data) ->
    return @scale(data)

class ScatterRendererView extends BokehView
  render : ->
    svg = d3.select(@el).select('svg').append('g')
      .attr('id', @tag_id('g'))
      .selectAll(@model.get('mark'))
      .data(@model.get_ref('data_source').get('data'))

    if  node == null
      node = d3.select(@el).append('svg')
        .attr('id', @tag_id('mainsvg'))
      node.append('g')
          .attr('id', @tag_id('flipY'))
          .append('g')
          .attr('id', @tag_id('plotcontent'))

    node.attr('width', @mget('outerwidth')).attr("height", @mget('outerheight'))
    #svg puts origin in the top left, we want it on the bottom left
    @tag_d3('flipY')
      .attr('transform',
        _.template('translate(0, {{h}} scale(1, -1)',
          {'h' : @mget('outerheight')}))
    @tag_d3('plotcontent').attr('transform',
      _.template('translate({{s}}, {{s}})', {'s' : @mget('border_space')}))

  render_frames : ->
    innernode = @tag_d3('innerbox')
    outernode = @tag_d3('outerbox')
    if innernode == null
      innernode = @tag_d3('plotcontent')
        .append('rect').attr('id', @tag_id('innerbox'))
      outernode = @tag_d3('flipY')
        .append('rect').attr('id', @tag_id('outerbox'))

    outernode.attr('fill', 'none')
  		.attr('stroke', @model.get('foreground-color'))
      .attr('width', @mget('outerwidth')).attr("height", @mget('outerheight'))

    innernode.attr('fill', 'none')
  		.attr('stroke', @model.get('foreground-color'))
      .attr('width', @mget('width')).attr("height", @mget('height'))

  render : ->
    @render_mainsvg();
    @render_frames();
    for own key, view of @renderers
      view.render()
    if not @model.get_ref('parent')
