【python系列】matplotlib简单画图subplot
来源:互联网 发布:js 设置data属性 编辑:程序博客网 时间:2024/05/28 17:05
可以使用subplot()快速绘制包含多个子图的图表,它的调用形式如下:
效果:
subplot(numRows, numCols, plotNum)
subplot将整个绘图区域等分为numRows行* numCols列个子区域,然后按照从左到右,从上到下的顺序对每个子区域进行编号,左上的子区域的编号为1。如果numRows,numCols和plotNum这三个数都小于10的话,可以把它们缩写为一个整数,例如subplot(323)和subplot(3,2,3)是相同的。subplot在plotNum指定的区域中创建一个轴对象。如果新创建的轴和之前创建的轴重叠的话,之前的轴将被删除。
代码:
#coding:utf-8import matplotlibimport matplotlib.pyplot as pltfor i,color in enumerate("rgbyck"): plt.subplot(321+i,axisbg=color)plt.show()
效果:
0 0
- 【python系列】matplotlib简单画图subplot
- python matplotlib.subplot绘制子图
- python matplotlib.subplot绘制子图
- python matplotlib.subplot绘制子图
- python一维插值以及subplot画图范例
- matplotlib简单的画图
- Matplotlib 简单画图
- Python matplotlib 画图相关
- python matplotlib 画图简介
- 使用python matplotlib画图
- Python Matplotlib画图示例
- python使用matplotlib画图
- python用matplotlib画图
- python画图:matplotlib(1)
- 【python】matplotlib画图
- python matplotlib 画图
- Python matplotlib画图表
- Python:Matplotlib 画图
- 基于linux-2.6.35的class_create(),device_create解析
- CI框架(七)codeIgniter.php:系统初始化文件解读
- java内存监测
- Spring MVC
- 【C++学习之路】继承、虚函数的练习题目
- 【python系列】matplotlib简单画图subplot
- PLSQL数据导入导出问题
- 学习和使用SAS的一点感想(京剧)
- Android中的数据存取和IO <第一篇>
- ASP.Net中文件下载的两种方法
- spring配置aop的总结
- WTL Splitters and Pane Containers
- PAT 1046. Shortest Distance (20)
- linux下vi命令大全