zoukankan      html  css  js  c++  java
  • python绘制图标——图表调整​​​​​​​subplots_adjust

    对于subplots_adjust()函数,我们可以想象成对word页面布局的调整
     
    ​​​​​​​说明、参数
    Adjusting the spacing of margins and subplots调整边距和子图的间距
     
    subplots_adjust(self, left=None, bottom=None, right=None, top=None,wspace=None, hspace=None)
     
    Tune the subplot layout.调整子图布局。
    The parameter meanings (and suggested defaults) are:参数含义(和建议的默认值)是:
    left  = 0.125  # the left side of the subplots of the figure图片中子图的左侧
    right = 0.9    # the right side of the subplots of the figure图片中子图的右侧
    bottom = 0.1   # the bottom of the subplots of the figure图片中子图的底部
    top = 0.9      # the top of the subplots of the figure图片中子图的顶部
    wspace = 0.2   # the amount of width reserved for space between subplots,
                   # expressed as a fraction of the average axis width
    #为子图之间的空间保留的宽度,平均轴宽的一部分
    hspace = 0.2   # the amount of height reserved for space between subplots,
                   # expressed as a fraction of the average axis height
    #为子图之间的空间保留的高度,平均轴高度的一部分
    加了这个语句,子图会稍变小,因为空间也占用坐标轴的一部分
    fig.subplots_adjust(wspace=0.5,hspace=0.5)
     
    ​​​​​​​对比效果图:
    右图是加加了subplots_adjust的
    生活不止眼前的苟且,还有诗与远方的田野! 我会定期更新我的微博,来一起自学python! --------如有问题欢迎指正~------------
  • 相关阅读:
    WPF-ListView单元格设置文字换行
    WPF-GridView设置列宽按比例分配
    C#控制台输入密码星号显示
    安装pycharm
    超强的链接2
    redis
    day 46 htmljianjie
    day45 html超文本标记语言
    43 非阻塞 io多路复用
    42 队列 线程池 协程 geven模块 协程完成的socket
  • 原文地址:https://www.cnblogs.com/huangchenggener/p/10971316.html
Copyright © 2011-2022 走看看