[IPython-dev] implementing sympy plots with d3 in the notebook

Brian Granger ellisonbg at gmail.com
Tue May 21 15:36:42 EDT 2013


Stefan,

> If any of you have 5 minutes to tell us whether we are doing something
> horribly wrong we would appreciate it.
>
> Recently, I tried to extend the sympy plotting module so that we can plot
> with d3.
>
> A proof of concept can be seen here (sympy pull request, vega and d3):
> https://github.com/sympy/sympy/pull/2120
>
> The 5 lines that deal with ipython are in `def show(self):`
>
>
> A more hackish earlier version can be seen here (blog post, only d3):
> http://blog.krastanov.org/2013/05/14/sympy-plots-with-d3-in-ipyhton/
>
>
> What is the IPython team opinion? Should we wait a few months for somekind
> of `_repr_json`?

Starting in the late summer we will implement a much less hackish API
for doing this type of thing.  That new API will some quite different
than what you are doing now.  Your current approach may continue to
work, but might need some changes.  The more you do now, the more you
will have to change.  The less you do now, the easier it will be in
the future.  The other thing that I mentioned on the sympy list is
that once the better APIs are in place, there are going to be
*multiple* libraries that emerge for doing d3 based plotting in the
notebook.  If you just wait, you can use those libraries without
inventing your own.  If it were me, I would wait and work on other
things in the meantime.

Cheers,

Brian

> Regards
> Stefan
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>



--
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com



More information about the IPython-dev mailing list