小编Bhu*_*mar的帖子

如何在Matplotlib中旋转花式箭头

如何旋转Matplotlib中的花式箭头(我不想动画),我尝试旋转,转换,它们都不适合我,我想,我做错了,请任何帮助或替代方案解决方案表示赞赏,我已粘贴下面的代码.

import matplotlib.pyplot as plt


fig, ax = plt.subplots()

#Arrow in degree
#Arrow represent the wind direction
degree= 45 #Arrow should rotate as per the specified degree, (0 degree is North)

#Draw Circle
#CENTER POINT
Circle1 = plt.Circle((5, 5), 0.1, color='blue', fill=True)
ax.add_artist(Circle1)
#CIRCLE
Circle2 = plt.Circle((5, 5), 6, color='blue', fill=False)
ax.add_artist(Circle2)

x3=5.0
y3=6.8
x4=5.0
y4=9.0  

#Wind Direction Arrow
#LEFT ARROW
ax.annotate('',
    xy=(x3-0.5, y3), xycoords='data',
    xytext=(-20, 50), textcoords='offset points', rotation=degree,
    size=20,
    # bbox=dict(boxstyle="round", fc="0.8"),
    arrowprops=dict(arrowstyle="fancy",
                    fc="0.6", …
Run Code Online (Sandbox Code Playgroud)

python matplotlib

5
推荐指数
1
解决办法
538
查看次数

标签 统计

matplotlib ×1

python ×1