将背景图像添加到matplotlib中的Circle补丁

时间:2016-12-02 16:58:04

标签: python matplotlib

有没有办法加载图像文件并将其用作matplotlib圆形补丁创建的圆圈的背景图像?

import matplotlib.pyplot as plt     
from matplotlib.patches import Circle

fig = plt.figure(figsize=(10,10))   
ax = fig.add_subplot(111)   
ci = Circle((2, -2), 5)   
ax.add_patch(ci)   
ax.annotate('1', xy=(2, -2), xycoords = 'data', xytext=(-2, 3),size=20, textcoords='data', arrowprops=dict(arrowstyle="fancy", fc="0.8", ec="0.6", patchB=el,connectionstyle="angle3,angleA=0,angleB=-90"),)
plt.show()

换句话说,我希望这个图中的圆圈有一个图像作为背景:

plot

0 个答案:

没有答案