       for i in [0..@idx.length-1]
         @idx[i] = @xrange.get('start') + (i/@idx.length)*@xrange.get('end')
 
-    @source.set('data', {idx: [@idx], ys: [ys]})
+    @source.set('data', {idx: @idx, ys: ys})
     @source.trigger('change', @source, {})
 
   set_xrange: (x0, x1) ->

class SimpleIndexPlot
  constructor: (options) ->
    @source = Collections('ColumnDataSource').create(
      data: {idx: [[]], ys: [[]]}
    )

    @xrange = Collections('Range1d').create({start: options.x0, end: options.x1})

      outer_width:   options.width  + 2*options.border
      outer_height:  options.height + 2*options.border
      tools: []
      title: ""
    )

    xaxis = Collections('GuideRenderer').create(
