title: How to make mpld3 work with seaborn (interactive tooltips)
body: <p>I can't seem to get the interactive tooltips powered by mpld3 to work with the fantastic lmplot-like scatter plots from seaborn.</p>
  
  <p>I'd love any pointer on how to get this to work! Thanks!</p>
  
  <p>Example Code:</p>
  
  <pre><code># I'm running this in an ipython notebook.
  %matplotlib inline
  import matplotlib.pyplot as plt, mpld3
  mpld3.enable_notebook()
  import seaborn as sns
  
  
  N=10
  data = pd.DataFrame({"x": np.random.randn(N),
                       "y": np.random.randn(N), 
                       "size": np.random.randint(20,200, size=N),
                       "label": np.arange(N)
                       })
  
  
  scatter_sns = sns.lmplot("x", "y", 
             scatter_kws={"s": data["size"]},
             robust=False, # slow if true
             data=data, size=8)
  fig = plt.gcf()
  
  tooltip = mpld3.plugins.PointLabelTooltip(fig, labels=list(data.label))
  mpld3.plugins.connect(fig, tooltip)
  
  mpld3.display(fig)
  </code></pre>
  
  <p>I'm getting the seaborn plot along with the following error:</p>
  
  <pre><code>Javascript error adding output!
  TypeError: obj.elements is not a function
  See your browser Javascript console for more details.
  </code></pre>
  
  <p>The console shows:</p>
  
  <pre><code>TypeError: obj.elements is not a function
      at mpld3_TooltipPlugin.draw (https://mpld3.github.io/js/mpld3.v0.2.js:1161:9)
      at mpld3_Figure.draw (https://mpld3.github.io/js/mpld3.v0.2.js:1400:23)
      at Object.mpld3.draw_figure (https://mpld3.github.io/js/mpld3.v0.2.js:18:9)
      at eval (eval at &lt;anonymous&gt; (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231), &lt;anonymous&gt;:14:14)
      at eval (eval at &lt;anonymous&gt; (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231), &lt;anonymous&gt;:15:5)
      at eval (native)
      at Function.x.extend.globalEval (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231)
      at x.fn.extend.domManip (https://mbcomp1:9999/static/components/jquery/jquery.min.js:5:21253)
      at x.fn.extend.append (https://mbcomp1:9999/static/components/jquery/jquery.min.js:5:18822)
      at OutputArea._safe_append (https://mbcomp1:9999/static/notebook/js/outputarea.js:336:26)
  outputarea.js:319 Javascript error adding output! TypeError: obj.elements is not a function
      at mpld3_TooltipPlugin.draw (https://mpld3.github.io/js/mpld3.v0.2.js:1161:9)
      at mpld3_Figure.draw (https://mpld3.github.io/js/mpld3.v0.2.js:1400:23)
      at Object.mpld3.draw_figure (https://mpld3.github.io/js/mpld3.v0.2.js:18:9)
      at eval (eval at &lt;anonymous&gt; (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231), &lt;anonymous&gt;:14:14)
      at eval (eval at &lt;anonymous&gt; (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231), &lt;anonymous&gt;:15:5)
      at eval (native)
      at Function.x.extend.globalEval (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231)
      at x.fn.extend.domManip (https://mbcomp1:9999/static/components/jquery/jquery.min.js:5:21253)
      at x.fn.extend.append (https://mbcomp1:9999/static/components/jquery/jquery.min.js:5:18822)
      at OutputArea._safe_append (https://mbcomp1:9999/static/notebook/js/outputarea.js:336:26)
  outputarea.js:338 TypeError: obj.elements is not a function
      at mpld3_TooltipPlugin.draw (https://mpld3.github.io/js/mpld3.v0.2.js:1161:9)
      at mpld3_Figure.draw (https://mpld3.github.io/js/mpld3.v0.2.js:1400:23)
      at Object.mpld3.draw_figure (https://mpld3.github.io/js/mpld3.v0.2.js:18:9)
      at eval (eval at &lt;anonymous&gt; (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231), &lt;anonymous&gt;:14:14)
      at eval (eval at &lt;anonymous&gt; (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231), &lt;anonymous&gt;:15:5)
      at eval (native)
      at Function.x.extend.globalEval (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231)
      at x.fn.extend.domManip (https://mbcomp1:9999/static/components/jquery/jquery.min.js:5:21253)
      at x.fn.extend.append (https://mbcomp1:9999/static/components/jquery/jquery.min.js:5:18822)
      at OutputArea._safe_append (https://mbcomp1:9999/static/notebook/js/outputarea.js:336:26)
  outputarea.js:319 Javascript error adding output! TypeError: obj.elements is not a function
      at mpld3_TooltipPlugin.draw (https://mpld3.github.io/js/mpld3.v0.2.js:1161:9)
      at mpld3_Figure.draw (https://mpld3.github.io/js/mpld3.v0.2.js:1400:23)
      at Object.mpld3.draw_figure (https://mpld3.github.io/js/mpld3.v0.2.js:18:9)
      at eval (eval at &lt;anonymous&gt; (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231), &lt;anonymous&gt;:14:14)
      at eval (eval at &lt;anonymous&gt; (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231), &lt;anonymous&gt;:15:5)
      at eval (native)
      at Function.x.extend.globalEval (https://mbcomp1:9999/static/components/jquery/jquery.min.js:4:4231)
      at x.fn.extend.domManip (https://mbcomp1:9999/static/components/jquery/jquery.min.js:5:21253)
      at x.fn.extend.append (https://mbcomp1:9999/static/components/jquery/jquery.min.js:5:18822)
      at OutputArea._safe_append (https://mbcomp1:9999/static/notebook/js/outputarea.js:336:26)
  </code></pre>