       renderers: [glyph.ref()]
       axes: [xaxis.ref(), yaxis.ref()]
       tools: []
-      width: @canvas_width
-      height: @canvas_height
+      width: @image_width
+      height: @image_height
     )
 
     return plot_model

    myrender  =  =>
      div.append(@spec_view.$el)
      @spec_view.render()
      span = $('<span></span>').append(@power_view.$el)
      div.append(span)
      @power_view.render()
      span = $('<span></span>').append(@hist_view.$el)
      div.append(span)
      @hist_view.render()
    _.defer(myrender)

  create_spec: () ->

    if not data[0]?
      return

    # apply the gain
    for i in [0..(data[0].length-1)]
      data[0][i] *= @gain
    for i in [0..(data[1].length-1)]
      data[1][i] *= @gain

    # update the spectrogram
    for i in [0..(SPECTROGRAM_LENGTH-1)]
      for j in [(NGRAMS-1)..1]
        @image[0][i*NGRAMS + j] = @image[0][i*NGRAMS + j - 1]
