当前位置:   article > 正文

matplotlib画图、如何提高图像分辨率?_matplotlib提高分辨率

matplotlib提高分辨率

matplotlib画图、如何提高图像分辨率?


Figure size (figsize) determines the size of the figure in inches. This gives the amount of space the axes (and other elements) have inside the figure. The default figure size is (6.4, 4.8) inches in matplotlib 2. A larger figure size will allow for longer texts, more axes or more ticklabels to be shown.
matplotlib的模型图像尺寸为(6.4, 4.8)英寸,用户可以通过figsize参数进行自定义尺寸的设置。比较大的尺寸会使得图像显示比较大的文本,而且会有更多的标签显示。
Dots per inches (dpi) determines how many pixels the figure comprises. The default dpi in matplotlib is 100.
每英寸点(dpi)决定了图形包含多少像素。默认的dpi为100;

 A figure of figsize=(w,h) will have

px, py = w*dpi, h*dpi  # pixels
# e.g.
# 6.4 inches * 100 dpi = 640 pixels
So in order to obtain a figure with a pixel size of e.g. (1200,600) you may chose several combinations of figure size and dpi, e.g.
所以,为了达到(1200,600)像素的一个图像,你可以通过dpi

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/831786
推荐阅读
相关标签
  

闽ICP备14008679号