title: Dynamically change the shape of bokeh Figure
body: <p>I am building a web app that will display images as part of a data analysis pipeline. For this, I need to dynamically change the width and height of a <code>Figure</code> object in bokeh.</p>
  
  <p>With the following code, the shape of the <code>Figure</code> is changed, but the change only takes effect after I resize my browser window, even if the browser window resize is ever so small.</p>
  
  <pre><code>import bokeh.plotting
  import bokeh.models
  import bokeh.layouts
  
  # set up the interface
  fig1 = bokeh.plotting.figure()
  button = bokeh.models.Button(label='scramble')
  
  # define a callback and connect it
  def callback():
      fig1.width = int(fig1.width * .8)
  button.on_click(callback)
  
  # add everything to the document
  bokeh.plotting.curdoc().add_root(bokeh.layouts.column(button, fig1))
  </code></pre>
  
  <p>Is there some update method which I need to run? I have read about "next tick callbacks" but I don't understand if that is relevant.</p>
  
  <p>The above behavior occurs both with firefox and chromium on my gnome system.</p>