在Matplotlib中绘制阴影外的箭头

use*_*827 13 python matplotlib

我有以下网格图,并想绘制一个箭头(使用MS绘制蓝色显示).我怎么能通过matplotlib做到这一点?我不知道有任何命令要做.

在此输入图像描述

Die*_*ich 17

import matplotlib.pyplot as plt

fg = plt.figure(1);
fg.clf();
ax = fg.add_subplot(1,1,1)
ax.annotate('', xy=(0, -0.1), xycoords='axes fraction', xytext=(1, -0.1), 
            arrowprops=dict(arrowstyle="<->", color='b'))
ax.grid(True)
fg.canvas.draw()
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

  • 因此,您可以通过说出(不存在的)框的去向来指定箭头的末端。哦,我需要你,但我不爱你,matplotlib。[副作用绘图](http://softwarerecs.stackexchange.com/questions/27240/alternative-to-matplotlib-for-scientific-plotting-with-python)确实如此。但解决方案+1,谢谢。 (2认同)

小智 9

用于clip_on = Falseax.arrow