title: Python: Plotting Bessel functions of the first kind with a float argument
body: <p>The equation I am working with is</p>
  
  <p>$$
  E = M_e + \sum_{n = 1}^N\frac{2}{n}\mathcal{J}_n(ne)\sin(nM_e)
  $$</p>
  
  <p>where $\mathcal{J}_n(x)$ is the nth Bessel function of the first kind.</p>
  
  <p>As a test, I plotted the first 6 Bessel functions and everything worked out correctly.  When I enter the argument of $n * e$, the plot isn't what I anticipated it to be.</p>
  
  <pre><code>import numpy as np
  import pylab as py
  import scipy.special as sp
  
  x = np.linspace(0, 15, 500000)
  
  for v in range(0, 6):
      py.plot(x, sp.jv(v, x))
  
  py.xlim((0, 15))
  py.ylim((-0.5, 1.1))
  py.legend(('$\mathcal{J}_0(x)$', '$\mathcal{J}_1(x)$', '$\mathcal{J}_2(x)$',
             '$\mathcal{J}_3(x)$', '$\mathcal{J}_4(x)$', '$\mathcal{J}_5(x)$'),
             loc = 0)
  py.xlabel('$x$')
  py.ylabel('$\mathcal{J}_n(x)$')
  #py.title('Plots of the first six Bessel Functions')                                
  py.grid(True)
  #py.savefig('besseln0to6.eps', format = 'eps')                                      
  py.show()
  
  e = 0.99
  
  
  def E(M):
      return (M + sum(2.0 / n * sp.jv(n * e, M) * np.sin(n * M)
                      for n in range(1, 3, 1)))
  
  M = np.linspace(0, 2 * np.pi, 500000)
  
  fig2 = py.figure()
  ax2 = fig2.add_subplot(111, aspect = 'equal')
  ax2.plot(E(M), M, 'b')
  
  
  def E2(M):
      return (M + sum(2.0 / n * sp.jv(n * e, M) * np.sin(n * M)
                      for n in range(1, 11, 1)))
  
  
  ax2.plot(E2(M), M, 'r')
  py.xlim((0, 2 * np.pi))
  py.ylim((0, 2 * np.pi))
  py.xlabel('Eccentric anomaly, $E$')
  py.ylabel('Mean anomaly, $M_e$')
  py.show()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ysG98.png" alt="enter image description here"></p>
  
  <p>The plot is supposed to look like for n = 10</p>
  
  <p><img src="https://i.stack.imgur.com/bow9i.png" alt="enter image description here"></p>