title: Updating a chart with Plotly offline with Python
body: <p>I am using <a href="https://pypi.org/project/plotly/" rel="nofollow noreferrer">Plotly</a> offline on <a href="https://en.wikipedia.org/wiki/Project_Jupyter#Jupyter_Notebook" rel="nofollow noreferrer">Jupyter</a>.</p>
  <p>I am plotting curves:</p>
  <pre class="lang-py prettyprint-override"><code>from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
  from plotly.graph_objs import *
  import datetime as dt
  
  list_date = [dt.datetime(2016,1,1).date(), dt.datetime(2016,1,2).date(), dt.datetime(2016,1,3).date(), dt.datetime(2016,1,4).date()]
  data = []
  for i in range(3) :
      list = [i/2+1, i/2+2, i/2+3, i/2+4]
      data.append(Scatter(x=list_date, y=list, name='y'+str(i)))
  figure = Figure(data=data)
  iplot(figure)
  </code></pre>
  <p>And I get a very nice graph!
  In the latter case, the user wants to add a bar graph on it (in addition to the two lines already there).</p>
  <pre class="lang-py prettyprint-override"><code>list_bar = [0.5, 1.5, 2.5, 3.5]
  data = [Bar(x=list_date, y=list_bar, name='bar')]
  figure.update(data=data)
  iplot(figure)
  </code></pre>
  <p>But I have only the bar chart, not the previous 2 lines. How to have offline the equivalent of the online function <code>fileopt='append'</code>?</p>
  <pre class="lang-py prettyprint-override"><code>py.plot(data, filename='append plot', fileopt='append')
  </code></pre>