我正在使用协作(在线jupyter笔记本),我有以下代码,我正在使用此功能绘制一些图形,并想在本地保存图形,我该怎么做?
def make_plot_comparison(Xlabel,Ylabel,l1,l2,l1_title,l2_title,name):
plt.xlabel(Xlabel)
plt.ylabel(Ylabel)
plt.plot(l1,label=l1_title)
plt.plot(l2,label=l2_title)
plt.legend(loc='center right')
plt.title(name)
#plt.xlim(-5, 25)
plt.savefig("abc.png")
plt.show()
Run Code Online (Sandbox Code Playgroud)