1.지원 가능한 이미지 확장자 종류를 보고 싶을 때

fig.canvas.get_supported_filetypes()  

출력>
{'eps': 'Encapsulated Postscript',
 'jpg': 'Joint Photographic Experts Group',
 'jpeg': 'Joint Photographic Experts Group',
 'pdf': 'Portable Document Format',
 'pgf': 'PGF code for LaTeX',
 'png': 'Portable Network Graphics',
 'ps': 'Postscript',
 'raw': 'Raw RGBA bitmap',
 'rgba': 'Raw RGBA bitmap',
 'svg': 'Scalable Vector Graphics',
 'svgz': 'Scalable Vector Graphics',
 'tif': 'Tagged Image File Format',
 'tiff': 'Tagged Image File Format',
 'webp': 'WebP Image Format'}

2. 이미지 저장

fig.savefig('파일이름.png')

3. 저장된 이미지 불러오기

이미지 다루는 모듈도 불러와야 한다.

​

from IPython.display import Image Image('my_figure.png')

+ Recent posts