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)
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
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!
>
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
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:
>
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