Python 无头巨蟒箭图

Python 无头巨蟒箭图,python,matplotlib,Python,Matplotlib,我想画一个没有箭头的箭袋图。我还希望有边框,这样箭头就可以从背景色图中脱颖而出。下面是我的代码的主要部分,试图生成这样一个图: plt.quiver(phia[sl1,sl2], R0a[sl1,sl2],u,v, color='white', headlength=0, headwidth = 1, pivot = 'middle', scale = scale, width=width, linewidth = 0.5) 如果这很重要的话,绘图是在极轴上。除非常短的线路外,这适用于大多数线

我想画一个没有箭头的箭袋图。我还希望有边框,这样箭头就可以从背景色图中脱颖而出。下面是我的代码的主要部分,试图生成这样一个图:

plt.quiver(phia[sl1,sl2], R0a[sl1,sl2],u,v, color='white', headlength=0, headwidth = 1, pivot = 'middle', scale = scale, width=width, linewidth = 0.5)
如果这很重要的话,绘图是在极轴上。除非常短的线路外,这适用于大多数线路。在这些情况下,一些来自边界的人造尾巴是在线条之后产生的。我生成的图中,受此影响最大的图如下:


对此问题的任何解决方案或绕过此问题的建议将不胜感激!谢谢

将箭头的
headaxislength
参数指定为零可以实现以下目的:

import numpy as np
import matplotlib.pyplot as plt

theta = np.linspace(0, 2*np.pi, 16)
r = np.linspace(0, 1, 6)
x = np.cos(theta)[:,np.newaxis]*r
y = np.sin(theta)[:,np.newaxis]*r

quiveropts = dict(color='white', headlength=0, pivot='middle', scale=3, 
    linewidth=.5, units='xy', width=.05, headwidth=1) # common options
f, (ax1, ax2) = plt.subplots(1,2, sharex=True, sharey=True)
ax1.quiver(x,y, -y, x, headaxislength=4.5, **quiveropts) # the default
ax2.quiver(x,y, -y, x, headaxislength=0, **quiveropts)
上面的代码生成以下箭图,没有箭头。