I am trying to recreate a 3d quiver plot that was made in Matlab using quiver3. The data is exactly the same, however when plotted the arrows seem to point to 0 with no arrow head and the x and y axis appear to be switched (as you have to reverse the x axis in python rather than y in matlab to get the same axis values. Does anyone know why this may be happening?
The matlab code is:
quiver3(zeros(size(binrange)), zeros(size(binrange)), binrange, v,u, zeros(size(v)),0);
set(gca,'YDir','reverse');
The matlab plot is:
The python code is:
ax.quiver3D(np.zeros(len(binrange)), np.zeros(len(binrange)), binrange, aa, bb, np.zeros(len(bb)), length=0.1, color='tomato')
plt.gca().invert_xaxis()
The python plot is:
pivot
. From the docs: "pivot: [ ‘tail’ | ‘middle’ | ‘tip’ ]
The part of the arrow that is at the grid point; the arrow rotates about this point, hence the name pivot." I would guess you havetip
set (possibly the default value?), and you wanttail
. – tmdavison