title: Integrate using SciPy with variable integrand members and put into meshgrid
body: <p>I'm looking to plot a vector field where the two components are determined from a numerical integration, and the integration is calculated using the coordinates in space where the vector is to be drawn.</p>
  
  <p>In the code below I define the integrand functions to be dependent on <code>r</code> and <code>z</code>, then in a loop define their values and evaluate both integrals at each (r,z).</p>
  
  <p>I have two questions:</p>
  
  <p>1) Is there a more pythonic way to evaluate these integrals with the variable <code>r</code> and <code>z</code>?</p>
  
  <p>2) What is the best way to store the values of the integrals along with their coordinates to generate a <code>quiver</code> plot from <code>meshgrid</code>s?</p>
  
  <pre><code>import scipy.integrate as spi
  import scipy.special as sps
  import numpy as np
  
  R = 2
  V = 10
  
  def Efield_r_integrand(k):
      return np.exp(-k*z)*k*R*V*sps.jv(1,k*r)*sps.jv(1,k*R)
  
  def Efield_z_integrand(k):
      return np.exp(-k*z)*k*R*V*sps.jv(0,k*r)*sps.jv(1,k*R)
  
  x_max = 3.0
  z_max = 3.0
  n_pts = 20
  
  for i in xrange(n_pts):
      r = float(i)/float(n_pts)*r_max
      for j in xrange(n_pts):
          z = float(j)/float(n_pts)*z_max
          current_Efield_r = spi.quad(Efield_r_integrand,0,np.inf)[]
          current_Efield_z = spi.quad(Efield_z_integrand,0,np.inf)[]
  </code></pre>