2013-02-21 13 views

回答

13

你只需要问canvas

plt.gcf().canvas.get_supported_filetypes() 

plt.gcf().canvas.get_supported_filetypes_grouped() 

documentation

+0

从 “机制的文档” 链接:文件类型= { 'PS': '后记',' eps':'封装的Postscript','pdf':'便携式文档格式','pgf':'LaTeX的PGF代码','png':'便携式网络图形','raw':'原始RGBA位图',' rgba':'Raw RGBA bitmap','svg':'S '可缩放矢量图形','jpg':'联合图像专家组','jpeg':'联合图像专家组','tif':'标记图像文件格式','tiff ':'标记图像文件格式'}¶ – zerocog 2017-10-06 18:39:05