gridspec模块
matplotlib的gridspec模块是专门指定画布中子图位置的模块,该模块中包含一个GridSpec类,通过显式地创建GridSpec类对象来自定义画布中子图的布局结构,使得子图能够更好地适应画布。GridSpec类的构造方法的语法格式如下:
GridSpec(nrows, ncols, figure=None, left=None, bottom=None, right=None,
top=None, wspace=None, hspace=None, width_ratios=None, height_ratios=None)