Integration of Plotly with Sympy

571 views
Skip to first unread message

Meet Shah

unread,
Feb 13, 2017, 1:58:54 PM2/13/17
to sympy
While reading GSoC Ideas of 2017, I came across of problems that have many possible solutions and it can't be returned to terminal , It can be another Function or static value and maybe something else. This kind of problems can be solved by Graph Theory easily. We can make graph with some (-x to +x) and  (-y to +y) and taking samples by time interval of 't'(ms or second as per accuracy req.) seconds. First I thought of making a external program that will execute with given values by terminal but after looking at Plotly , I thought that we can support that library by sympy. We can send output of Sympy to Plotly to Make graphs and solve critical Questions. It would be pipe Implementation of sympy to plotly . Is it a good idea to work and upgrade Sympy to next Level...?

Aaron Meurer

unread,
Feb 13, 2017, 2:01:51 PM2/13/17
to sy...@googlegroups.com
This is a useful idea, although it should perhaps be part of a larger gsoc project to improve plotting. I think SymPy should also look at integrating with mayavi (for 3D plots) and bokeh (for interactive plots). The matplotlib support can be improved as well. 

Aaron Meurer

On Mon, Feb 13, 2017 at 1:58 PM Meet Shah <meetsh...@gmail.com> wrote:
While reading GSoC Ideas of 2017, I came across of problems that have many possible solutions and it can't be returned to terminal , It can be another Function or static value and maybe something else. This kind of problems can be solved by Graph Theory easily. We can make graph with some (-x to +x) and  (-y to +y) and taking samples by time interval of 't'(ms or second as per accuracy req.) seconds. First I thought of making a external program that will execute with given values by terminal but after looking at Plotly , I thought that we can support that library by sympy. We can send output of Sympy to Plotly to Make graphs and solve critical Questions. It would be pipe Implementation of sympy to plotly . Is it a good idea to work and upgrade Sympy to next Level...?

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/400b7905-7211-4dc0-a356-67ccec5aface%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Björn Dahlgren

unread,
Feb 19, 2017, 1:26:56 PM2/19/17
to sympy


On Monday, 13 February 2017 20:01:51 UTC+1, Aaron Meurer wrote:
This is a useful idea, although it should perhaps be part of a larger gsoc project to improve plotting. I think SymPy should also look at integrating with mayavi (for 3D plots) and bokeh (for interactive plots). The matplotlib support can be improved as well. 


I've also been thinking about using bokeh. SymPy could use `jscode` in the codeprinters to provide callbacks to the user which are evaluated in the browser (since bokeh allows the user to include javascript code).

Aaron Meurer

unread,
Feb 19, 2017, 2:54:58 PM2/19/17
to sy...@googlegroups.com
Does bokeh allow computations in the browser?

Of course, if we print the expression to JavaScript, that opens up a lot of possibilities for plotting libraries. I think if we take that approach there may be better ones than bokeh for function plotting. 

Aaron Meurer

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.

Denis Akhiyarov

unread,
Feb 19, 2017, 11:33:45 PM2/19/17
to sympy
I would prefer integration of SymPy with Altair plotting, since it supports subset of bokeh, plotly, matplotlib, pandas, seaborn, etc.
It looks like it has support for IPython and jupyter.

Then something different for 3d plots, supported by plotly, matplotlib, mayavi, pythreejs, lightning.

Björn Dahlgren

unread,
Feb 24, 2017, 6:49:48 AM2/24/17
to sympy


On Sunday, 19 February 2017 20:54:58 UTC+1, Aaron Meurer wrote:
Does bokeh allow computations in the browser?

Yes, that's the beauty:
http://bokeh.pydata.org/en/latest/docs/user_guide/interaction/callbacks.html#customjs-for-generic-events

One could derive some expression for plotting in SymPy and export it to a static html which may still be interactive.
I'm not proficient in javascript so I haven't looked into it any further.

Tony Hirst

unread,
Feb 24, 2017, 11:38:53 AM2/24/17
to sympy
For 3D plots, I noticed a recent discussion around this in the Teaching with Jupyter group in context of Mathbox. Example: https://nbviewer.jupyter.org/github/znah/mathbox/blob/jupyter/examples/notebooks/mathbox.ipynb

Björn Dahlgren

unread,
Feb 24, 2017, 12:50:16 PM2/24/17
to sympy


On Friday, 24 February 2017 17:38:53 UTC+1, Tony Hirst wrote:
For 3D plots, I noticed a recent discussion around this in the Teaching with Jupyter group in context of Mathbox. Example: https://nbviewer.jupyter.org/github/znah/mathbox/blob/jupyter/examples/notebooks/mathbox.ipynb

Wow, that's really beautiful, great for qualitative plotting. Didn't see many examples with ticked axis though..

Meet Shah

unread,
Feb 25, 2017, 2:49:55 AM2/25/17
to sympy
For now, I am working on 2D plots (static graphs) with "bokeh" and "mathplotlib" as I thought that both has better representation as graph and that can be improved time by time, I am thinking to add new methods in plotting module that shows directly graph as external "bokeh' or "mathplotlib" by override current plotting module methods so both can be useful. so, for now I am thinking of "bokeh" primarily so should I continue with that or "mathplotlib" is better option as It doesn't require external browser.
Reply all
Reply to author
Forward
0 new messages