Matplotlib:figure(背景颜色)

函数:
figure(num=None, figsize=None, dpi=None, facecolor=None, edgecolor=None, frameon=True, FigureClass=Figure, clear=False, **kwargs)

  • num : integer or string, optional, default: none,num:如果此参数没有提供,则一个新的figure对象将被创建,同时增加figure的计数数值,此数值被保存在figure对象的一个数字属性当中。如果有此参数,且存在对应id的figure对象,则激活对于id的figure对象。如果对应id的figur对象不存在,则创建它并返回它。如果num的值是字符串,则将窗口标题设置为此字符串。
  • figsize : tuple of integers, optional, default: None
    width, height in inches. If not provided, defaults to rc figure.figsize
    figsize:以英寸为单位的宽高,缺省值为 rc figure.figsize (1英寸等于2.54厘米)
  • dpi : integer, optional, default: None dpi:图形分辨率,缺省值为rc figure.dpi
  • facecolor :
    the background color. If not provided, defaults to rc figure.facecolo
    facecolor:背景色
    plt.figure(num="6*2 inches", figsize=(6, 2),facecolor="gray")
    plt.show()
    
    在这里插入图片描述
  • edgecolor :
    the border color. If not provided, defaults to rc figure.edgecolor
    edgecolor:边框颜色
  • clear: bool, optional, default: False
    If True and the figure already exists, then it is cleared
    clear:重建figure实例
  • 0
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值