title: Uncaught ReferenceError: Plotly is not defined
body: <p>I am trying to create plots from jupyter kernel (based on ProcessMetaKernel) and display plots in jupyter notebook.</p>
  
  <p>My Jupyter kernel code is</p>
  
  <pre><code>class MyKernel(ProcessMetaKernel):
    def do_execute_direct(self, code, silent=True):
      import plotly
      import plotly.graph_objs as go
      plot_div=plotly.offline.plot({"data": [go.Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1])],"layout": go.Layout(title="hello world")}, auto_open=False, output_type='div',include_plotlyjs=True)
      self.Display(HTML(data=plot_div))
      return code
  </code></pre>
  
  <p>Expected Results: plot displayed in the notebook</p>
  
  <p>Actual Results: plot not displayed, noticed following error message in browser console</p>
  
  <p>Uncaught ReferenceError: Plotly is not defined</p>
  
  <pre><code>at &lt;anonymous&gt;:7:21
  
  at m (jquery.min.js:2)
  
  at Re (jquery.min.js:2)
  
  at w.fn.init.append (jquery.min.js:2)
  
  at OutputArea._safe_append (outputarea.js:457)
  
  at OutputArea.append_display_data (outputarea.js:660)
  
  at OutputArea.append_output (outputarea.js:346)
  
  at OutputArea.handle_output (outputarea.js:257)
  
  at output (codecell.js:395)
  
  at Kernel._handle_output_message (kernel.js:1196)
  </code></pre>