Re: [sympy] Grid in sympy plotting

2019-06-27 Thread Aaron Meurer
If you want advanced plotting things in SymPy it's often easier to plot your function directly with matplotlib using something like import numpy as np import matplotlib.pyplot as plt a = np.linspace(-10, 10, 1000) # Replace with your desired range and number of points f = sympy.lambdify(x, expr)

Re: [sympy] Grid in sympy plotting

2019-06-27 Thread Lee Smith
Yep. Well I will continue to look into this. Of course, if I just did everything in matplotlib ... no problemo CODE ON ! On Thu, Jun 27, 2019 at 11:59 AM Oscar Benjamin wrote: > I guess it depends what environment you use (I used ipython). Looks like > you're using Jupyter and I'm not sure

Re: [sympy] Grid in sympy plotting

2019-06-27 Thread Oscar Benjamin
I guess it depends what environment you use (I used ipython). Looks like you're using Jupyter and I'm not sure how to plotting works there. On Thu, 27 Jun 2019 at 19:24, Lee Smith wrote: > Thank you ! > > Actually I tried this and got TWO graphs. One just the grid then the > functions! >

Re: [sympy] Grid in sympy plotting

2019-06-27 Thread Lee Smith
Thank you ! Actually I tried this and got TWO graphs. One just the grid then the functions! Suggestions? [image: Sympy_grid.PNG] On Wed, Jun 26, 2019 at 3:26 AM Oscar Benjamin wrote: > Hi Lee, > > SymPy's plotting module uses matplotlib so it is reasonable to use the > matplotlib API for

Re: [sympy] Grid in sympy plotting

2019-06-26 Thread Oscar Benjamin
Hi Lee, SymPy's plotting module uses matplotlib so it is reasonable to use the matplotlib API for adding a grid. I just tried this and it works fine: In [1]: plot(x**2) Out[1]: In [2]: from matplotlib.pyplot import grid In [3]: grid() Oscar On Wed, 26 Jun 2019 at 01:59, Lee Smith wrote: >

[sympy] Grid in sympy plotting

2019-06-25 Thread Lee Smith
Greetings: I want to display a grid in a sympy plot. The sympy.doc page only discusses mesh grids. On searching through Google, I found only one result that suggested using matplotlib.pyplot in addition to the sympy.plot(...) method. This should be simple and I am surprised that it is not