你如何改变用matplotlib绘制的图形的大小? [英] How do you change the size of figures drawn with matplotlib?

查看:366
本文介绍了你如何改变用matplotlib绘制的图形的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.org / api / _as_gen / matplotlib.pyplot.figure.html#matplotlib.pyplot.figurerel =noreferrer> figure 告诉您呼叫签名:

  figure(num = None,figsize =(8,6),dpi = 80,facecolor ='w',edgecolor ='k')

所以 figure(figsize =(1,1))创建一个英寸英寸的图像,这将是80乘80像素,除非你也提供不同的dpi参数。


How do you change the size of figure drawn with matplotlib?

解决方案

figure tells you the call signature:

figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')

So figure(figsize=(1,1)) creates an inch-by-inch image, which will be 80-by-80 pixels unless you also give a different dpi argument.

这篇关于你如何改变用matplotlib绘制的图形的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆