没有合适的资源?快使用搜索试试~ 我知道了~
首页matplotlib使用手册
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/1250695/bg1.jpg)
Matplotlib
Release 0.98.5.1
Darren Dale, Michael Droettboom, Eric Firing, John Hunter
December 17, 2008
![](https://csdnimg.cn/release/download_crawler_static/1250695/bg2.jpg)
![](https://csdnimg.cn/release/download_crawler_static/1250695/bg3.jpg)
CONTENTS
I User’s Guide 1
1 Introduction 3
2 Installing 5
2.1 Ok, so you want to do it the hard way? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Installing from source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Build requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 Pyplot tutorial 9
3.1 Controlling line properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Working with multiple figures and axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Working with text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4 Interactive navigation 19
4.1 Navigation Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5 Customizing matplotlib 23
5.1 The matplotlibrc file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2 Dynamic rc settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6 Using matplotlib in a python shell 31
6.1 Ipython to the rescue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6.2 Other python interpreters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.3 Controlling interactive updating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7 Working with text 35
7.1 Text introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.2 Basic text commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.3 Text properties and layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.4 Writing mathematical expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.5 Text rendering With LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.6 Annotating text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8 Artist tutorial 59
8.1 Customizing your objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
i
![](https://csdnimg.cn/release/download_crawler_static/1250695/bg4.jpg)
8.2 Object containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
8.3 Figure container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
8.4 Axes container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
8.5 Axis containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
8.6 Tick containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
9 Event handling and picking 73
9.1 Event connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
9.2 Event attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
9.3 Mouse enter and leave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
9.4 Object picking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
10 Plotting guide 83
10.1 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
10.2 Colormaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
10.3 Colorbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
10.4 Contouring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
10.5 Scatter plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
10.6 Log plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.7 Polar plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.8 Filled plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.9 Bar charts, histograms and errorbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.10 Timeseries plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.11 Sparsity plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.12 Boxplots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.13 Working with dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
10.14 Working with masked/missing data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
10.15 Working with collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
10.16 Creating figure and axes legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
11 Toolkits 87
11.1 Basemap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
11.2 GTK Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
11.3 Excel Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
11.4 Natgrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
12 Screenshots 89
12.1 Simple Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
12.2 Subplot demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
12.3 Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
12.4 Path demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
12.5 Ellipses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
12.6 Bar charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
12.7 Pie charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
12.8 Table demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
12.9 Scatter demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
12.10 Slider demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
12.11 Fill demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
ii
![](https://csdnimg.cn/release/download_crawler_static/1250695/bg5.jpg)
12.12 Date demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
12.13 Financial charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
12.14 Basemap demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
12.15 Log plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
12.16 Polar plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
12.17 Legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
12.18 Mathtext_examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
12.19 Native TeX rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
12.20 EEG demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
13 What’s new in matplotlib 109
13.1 What new in 0.98.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
14 License 117
14.1 License agreement for matplotlib 0.98.5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
15 Credits 119
II The Matplotlib FAQ 123
16 Installation FAQ 125
16.1 Report a compilation problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
16.2 matplotlib compiled fine, but nothing shows up with plot . . . . . . . . . . . . . . . . . . . 126
16.3 Cleanly rebuild and reinstall everything . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
16.4 Install from svn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
16.5 Install from git . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
16.6 Backends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
16.7 OS-X questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
16.8 Windows questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
17 Usage 131
17.1 Matplotlib, pylab, and pyplot: how are they related? . . . . . . . . . . . . . . . . . . . . . 131
18 Howto 133
18.1 Plotting: howto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
18.2 Contributing: howto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
18.3 Matplotlib in a web application server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
18.4 Search examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
19 Troubleshooting 147
19.1 Obtaining matplotlib version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
19.2 matplotlib install location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
19.3 .matplotlib directory location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
19.4 Report a problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
19.5 Problems with recent svn versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
iii
剩余753页未读,继续阅读
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/c01bb6ca0f134c2c91e5236e16be2871_gongw03.jpg!1)
gongw03
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
会员权益专享
最新资源
- 构建智慧路灯大数据平台:物联网与节能解决方案
- 智慧开发区建设:探索创新解决方案
- SQL查询实践:员工、商品与销售数据分析
- 2022智慧酒店解决方案:提升服务效率与体验
- 2022年智慧景区信息化整体解决方案:打造数字化旅游新时代
- 2022智慧景区建设:大数据驱动的5A级管理与服务升级
- 2022智慧教育综合方案:迈向2.0时代的创新路径与实施策略
- 2022智慧教育:构建区域教育云,赋能学习新时代
- 2022智慧教室解决方案:融合技术提升教学新时代
- 构建智慧机场:2022年全面信息化解决方案
- 2022智慧机场建设:大数据与物联网引领的生态转型与客户体验升级
- 智慧机场2022安防解决方案:打造高效指挥与全面监控系统
- 2022智慧化工园区一体化管理与运营解决方案
- 2022智慧河长管理系统:科技助力水环境治理
- 伪随机相位编码雷达仿真及FFT增益分析
- 2022智慧管廊建设:工业化与智能化解决方案
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)