在 Matplotlib 中绘制花式箭头

Drawing fancy arrows in Matplotlib

这是我从 Lorena A. Barba group 中截取的图 http://i4.tietuku.com/229231358fba454f.png

我只是对图中显示的红色箭头与白色圆点混合感到好奇。

matplotlib有没有画这种箭头的功能(我觉得是"canyon style")

也许这个更清楚:

http://i4.tietuku.com/88a340147ca388c6.png

从 James Bagrow 的实验室中截取 here

不知道可不可以。而且看图集(http://matplotlib.org/gallery.html),好像不太容易得到

但也许 plt.xkcd() 提供了一些关于如何进行的线索。

这里是pyplot.py的源代码:https://github.com/matplotlib/matplotlib/blob/12e08785fcb0b1a6bce946de689a3f84b67731f7/lib/matplotlib/pyplot.py

调用 plt.xkcd() 只需更改一些 rcParams,即 'path.sketch' 给出线条的随机性。因此,通过类似的方法,您可以尝试使用那些 rcParams 来得出类似样式的笔触...

有很多参数可以使用。 (自定义 matplotlib,http://matplotlib.org/users/customizing.html