title: How do I use quiver in Python for polar?
body: <p>Firstly, yes I have read previous threads and documentation about this issue, for example <a href="https://stackoverflow.com/questions/13828800/how-to-make-a-quiver-plot-in-polar-coordinates">How to make a quiver plot in polar coordinates</a>. This didn't help me all the way. Let me show you what I am working with and then some code.<a href="https://i.stack.imgur.com/jJ1rG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jJ1rG.png" alt="enter image description here"></a>
  This is a converging canal, it shows a velocity/vector field. Clearly I only have a radial component, but it changes with the angle theta. This pattern of arrows repeats itself as we go down(stream) towards alpha. So it should be simple to plot, right. Here is the equation for the radial velocity component:</p>
  
  <p><a href="https://i.stack.imgur.com/cgWlg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cgWlg.png" alt="enter image description here"></a>
  Now, before I show my code, I have stored values of f(theta) for a number of thetas. This function, f, has to be numerically solved and I have stored it as a vector, u[0]. This what I do in my code as of now:</p>
  
  <pre><code>radii = np.linspace(0.1,1,11)
  thetas = np.linspace(-alpha,alpha,20)
  theta, r = np.meshgrid(thetas, radii)
  
  q = 0.0001
  
  
  dr = [-q/x for x in radii]*u_sol[0]
  dt = 0
  
  f = plt.figure()
  ax = f.add_subplot(111, polar=True)
  
  ax.quiver(theta, r, dr * cos(theta) - dt * sin (theta), dr * sin(theta) +     
  dt* cos(theta))
  </code></pre>
  
  <p>The fifth expression for the variable dr was a desperate attempt at multiplying all r of a fix length in the meshgrid with u[0], but these do not have the same dimensions, therefore it doesn't work. So I am stuck.</p>
  
  <p>My question is how I obtain a vectorfield for the converging canal? I can't really put the last pieces togetether, do I manipulate the meshgrid?</p>
  
  <p>Results so far in MATLAB:
  <a href="https://i.stack.imgur.com/eGXkA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eGXkA.png" alt="enter image description here"></a></p>
  
  <p><strong>Edit</strong> The code above was taken from the link in the beginning of my text. I made some changes to dr and dt, but otherwise nothing.</p>