I have some problems with the Matplotlib quiver schedule. Given the velocity vector field, I want to build velocity vectors on top of the flow lines. The vectors do not relate to the flow function as expected.
To compute the stream function, I use the Python version of Dr. Pankratov’s Matlab code, available at http://www-pord.ucsd.edu/~matlab/stream.htm (mine will be available shortly on GitHub).
Using its results, I use this code:
import numpy import pylab
to get the following result to illustrate my problems.

Apparently, the calculations are excellent, but the velocity vectors are not tangent to the flow function, as expected. Using exact save values, Matlab creates a portion of the quiver that shows exactly what I want. In my case, setting the aspect ratio to one gives me the desired result, but makes the rectangle of the axes have a specific aspect ratio.
ax = pylab.axes() ax.set_aspect(1.)
I have already unsuccessfully tried various arguments, such as “units”, “angles” or “scale”.
Does anyone know how to create portions of a quiver that adjust to the proportion of the canvas and still touch my contour lines as expected?
I expect a result similar to this (note how the vectors touch the streamlines): 
Thank you so much!
python matplotlib velocity
regeirk
source share