title: How to update plotly plot in offline mode (Jupyter notebook)
body: <p>I would like to build a simple interface with plotly and ipywidgets inside Jupyter Notebook (offline mode) and I am wondering how to update the plot if I want to add extra data. Here is my code:</p>
  
  <pre><code>import plotly
  from plotly.offline import iplot
  from plotly.graph_objs import graph_objs as go
  import ipywidgets as widgets
  from IPython.display import display
  
  plotly.offline.init_notebook_mode(connected=True)
  
  trace_high = go.Scatter(
                  x=[1,2,3,4],
                  y=[4,6,2,8],
                  name = "High",
                  line = dict(color = '#7F7F7F'),
                  opacity = 0.8)
  
  
  data = [trace_high]
  
  def plot_extra_data(drop):
      if drop["new"] == "2":
          trace_low = go.Scatter(
                  x=[1,2,3,4],
                  y=[1,7,3,5],
                  name = "Low",
                  line = dict(color = 'green'),
                  opacity = 0.8)
          data.append(trace_low)
          fig.update(data=data)
  
  drop = widgets.Dropdown(
      options=['1', '2', '3'],
      value='1',
      description='Number:',
      disabled=False,
  )
  
  drop.observe(plot_extra_data, "value")
  
  display(drop)
  fig = dict(data=data)
  iplot(fig)
  </code></pre>
  
  <p>Any comments/suggestions are highly appreciated. </p>