当前位置:网站首页>Matplotlib save image to file
Matplotlib save image to file
2022-07-24 01:40:00 【Beginner Xiaobai Lu】
savefig(fname, *, dpi='figure', format=None, metadata=None,
bbox_inches=None, pad_inches=0.1,
facecolor='auto', edgecolor='auto',
backend=None, **kwargs
)
- fname:str or path-like or binary file-like, A string containing the path of the file name , Or something like python The object of the document . If format The parameter is set to None And frame The argument is a string , The output format will be derived from the extension of the file name . No extension will be stored as... In the default format “png” Format , And add the appropriate extension to fname Back .
- dpi:float or ‘figure’, default: rcParams[“savefig.dpi”] (default: ‘figure’), The resolution of the , Points per inch
- format:str, File format , such as “png”,“pdf”,“svg” etc. , Unset behavior will be recorded in fname in .
- metadata:dict, optional
- bbox_inches:str or Bbox, default: rcParams[“savefig.bbox”] (default: None), Only the given part of the drawing will be saved . Set to “tight” To properly match the saved graphics .
- pad_inches:float, default: rcParams[“savefig.pad_inches”] (default: 0.1), ( Default : 0.1) The amount of fill around the saved drawing .
- facecolor:color or ‘auto’, default: rcParams[“savefig.facecolor”] (default: ‘auto’), Graphic surface color . If it is “auto”, Use the surface color of the current drawing .
- edgecolor:color or ‘auto’, default: rcParams[“savefig.edgecolor”] (default: ‘auto’), Graphic edge color . If it is “auto”, Use the edge color of the current drawing .
- backend:str, optional
- orientation:{‘landscape’, ‘portrait’}
- papertype:str
- transparent:bool, Used to set the picture background to transparent . Graphics will also be transparent , Unless the surface color and color are specified through the keyword parameters / Or edge color .
- bbox_extra_artists:list of Artist, optional,
- pil_kwargs:dict, optional
Example :
fig.savefig("gif.png")
边栏推荐
- 刚开始使用,请教些问题和教程或分享帖子
- Three document usage
- Topological sorting & critical path
- Thread pool interview
- Number of combinations....
- Hcip experiment
- How to finally generate a file from saveastextfile in spark
- [code case] website confession wall & to do list (including complete source code)
- Structure the second operation of the actual combat battalion module
- HCIP第九天笔记
猜你喜欢

Interview question: what are the differences between ArrayList and LinkedList

SCM learning notes 9 -- common communication methods (based on Baiwen STM32F103 series tutorials)

Hcip seventh day notes

Exchange 2010通配符SSL证书安装文档

Kotlin foundation from introduction to advanced series explanation (basic chapter) keyword: suspend

win11之缺点

小熊派简介和环境搭建

HCIP第五天笔记

架构实战营模块二作业

How to synchronize MySQL database when easycvr platform is upgraded to the latest version v2.5.0?
随机推荐
jenkins多任務並發構建
Exchange 2013 SSL证书安装文档
Just started to use, ask some questions and tutorials or share posts
Is it safe for Huatai Securities to open an account? Is it true? Is it formal
SCM learning notes 9 -- common communication methods (based on Baiwen STM32F103 series tutorials)
OSPF (fourth day notes)
Summary of HCIA knowledge points
暑假第三周
How to solve the problem that the universal vision NVR device is connected to the easycvr platform and cannot be online after offline?
How QT counts the frequency of letters in a string
Arm architecture and programming 7 -- exceptions and interrupts (based on Baiwen arm architecture and programming tutorial video)
The first day of little bear pie
暑假第三周
Three document usage
Matlab绘制双坐标图(全网最简单)
Bat Code: batch file underline rename
Database security and data integrity
How to finally generate a file from saveastextfile in spark
IP address and subnet division (A2)
How to solve the problem that the device video cannot be played due to the missing CGO playback callback parameters of easycvr platform?