Hi Mr.Jake,

I have tested both simple and general templates and both if them works
fine.

I didn't test the template that require requirejs. However, I'm sure it
will work fine.

Thank you for accepting my PR.
 On Mar 24, 2014 1:31 PM, "Jake Vanderplas" <notifications@github.com>
wrote:

> In mpld3/_display.py:
>
> >  <script type="text/javascript">
> >    {{ extra_js }}
> > -  var spec{{ figid }} = {{ figure_json }};
> > -  var fig{{ figid }} = mpld3.draw_figure("fig{{ figid }}", spec{{ figid }});
> > +  mpld3.draw_figure("{{ figid }}", {{ figure_json }});
>
> I'd actually like this to be within an anonymous function: something like
> this:
>
> !function(mpld3,  undefined){
>   {{ extra_js }}
>   mpld3.draw_figure("{{ figid }}", {{ figure_json }});}(mpld3);
>
> (pretty sure this is OK, though I'd want to double-check that it works).
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/jakevdp/mpld3/pull/102/files#r10895523>
> .
>