title: How to convert sympy function to plot with matplotlib?
body: <p>I have certain function, for example sin(b*x), with sympy I get derivative and antiderivative expressions, but I need to plot these 3 functions in matplotlib. My problem is I can't convert correctly functions to numpy in order to plot in matplotlib. I have followed the documentation in sympy page with lambify function but it doesn't work. <a href="http://docs.sympy.org/latest/modules/utilities/lambdify.html" rel="nofollow noreferrer">http://docs.sympy.org/latest/modules/utilities/lambdify.html</a></p>
  
  <p>I have this code:</p>
  
  <pre><code>from sympy import Symbol, diff, integrate, sin, cos, Function
  from sympy.utilities.lambdify import lambdify, implemented_function
  from sympy.abc import x
  
  import numpy as np
  import matplotlib.pyplot as plt
  from matplotlib.widgets import Slider, Button, RadioButtons
  
  def signal(b,x):
      return sin(b*x)
  
  def derivative(b,x):
      yprime = diff(signal(b,x), x)   
      return yprime
  
  def antiderivative(b,x):
      anti = integrate(signal(b,x), x)
      return anti
  
  b = 5
  
  evalfunc = lambdify((b,x), signal(b,x), modules=['numpy'])
  evalderiv = lambdify((b,x), derivative(b,x), modules=['numpy'])
  evalantideriv = lambdify((b,x), antiderivative(b,x), modules=['numpy'])
  
  axis_color = 'lightgoldenrodyellow'
  fig = plt.figure()
  ax = fig.add_subplot(1,1,1)
  fig.subplots_adjust(left=0.25, bottom=0.25)
  t = np.arange(-10, 10, 0.001)
  
  [line] = ax.plot(t, evalfunc(b,t), linewidth=2, color='red')
  [line2] = ax.plot(t, evalderiv(b,t), linewidth=2, color='blue')
  [line3] = ax.plot(t, evalantideriv(b,t), linewidth=2, color='blue')
  ax.set_xlim([-10, 10])
  ax.set_ylim([-5, 5])
  
  ax.grid()
  plt.show()
  </code></pre>
  
  <p>It fails in ax.plot ValueError: sequence too large; cannot be greater than 32</p>