1. subplot 函数介绍
在实践中,经常需要在一张画布上绘制多个图形,subplot 函数便是 matplotlib 的 pyplot 模块中用于绘制多图的函数。其调用格式如下:
subplot(nrows, ncols, index, **kwargs)
subplot(pos, **kwargs)
subplot(ax)
参数说明
- nrows, ncols, index:三个整数,用于描述子块(子图)的位置。如果这三个整数依次是 nrows、ncols 和 index,则子块将在具有nrows 排和 ncols 列的网格上占据索引位置。索引从左上角的 1 开始向右增加。
- pos :是一个三位整数,其