├── .gitattributes ├── LICENSE.txt ├── README.md ├── data ├── Drugs.csv ├── diamonds.csv ├── iris.csv ├── layout_ex1.csv ├── pokemon.csv └── tips.csv ├── docs ├── .buildinfo ├── .nojekyll ├── _images │ ├── index_10_0.png │ ├── index_10_01.png │ ├── index_10_02.png │ ├── index_11_0.png │ ├── index_11_01.png │ ├── index_11_02.png │ ├── index_11_03.png │ ├── index_12_0.png │ ├── index_12_01.png │ ├── index_12_02.png │ ├── index_12_03.png │ ├── index_13_0.png │ ├── index_13_01.png │ ├── index_13_02.png │ ├── index_14_0.png │ ├── index_14_01.png │ ├── index_14_02.png │ ├── index_14_03.png │ ├── index_15_0.png │ ├── index_15_01.png │ ├── index_15_02.png │ ├── index_16_0.png │ ├── index_16_01.png │ ├── index_16_02.png │ ├── index_17_0.png │ ├── index_17_01.png │ ├── index_17_02.png │ ├── index_17_03.png │ ├── index_18_0.png │ ├── index_18_01.png │ ├── index_18_1.png │ ├── index_19_0.png │ ├── index_19_01.png │ ├── index_19_02.png │ ├── index_1_0.png │ ├── index_20_0.png │ ├── index_20_01.png │ ├── index_21_0.png │ ├── index_21_01.png │ ├── index_21_02.png │ ├── index_21_03.png │ ├── index_21_1.png │ ├── index_22_0.png │ ├── index_22_01.png │ ├── index_23_0.png │ ├── index_23_01.png │ ├── index_23_02.png │ ├── index_24_0.png │ ├── index_24_01.png │ ├── index_25_0.png │ ├── index_25_01.png │ ├── index_25_02.png │ ├── index_26_0.png │ ├── index_26_01.png │ ├── index_27_0.png │ ├── index_27_01.png │ ├── index_27_02.png │ ├── index_28_0.png │ ├── index_28_01.png │ ├── index_29_0.png │ ├── index_29_01.png │ ├── index_29_1.png │ ├── index_2_0.png │ ├── index_2_01.png │ ├── index_2_02.png │ ├── index_30_0.png │ ├── index_30_1.png │ ├── index_31_0.png │ ├── index_31_01.png │ ├── index_31_1.png │ ├── index_32_0.png │ ├── index_33_0.png │ ├── index_33_01.png │ ├── index_34_0.png │ ├── index_35_0.png │ ├── index_35_01.png │ ├── index_35_1.png │ ├── index_36_1.png │ ├── index_37_0.png │ ├── index_37_01.png │ ├── index_37_1.png │ ├── index_38_0.png │ ├── index_39_0.png │ ├── index_3_0.png │ ├── index_3_01.png │ ├── index_3_02.png │ ├── index_3_03.png │ ├── index_40_0.png │ ├── index_41_0.png │ ├── index_4_0.png │ ├── index_4_01.png │ ├── index_4_02.png │ ├── index_5_0.png │ ├── index_5_01.png │ ├── index_5_02.png │ ├── index_6_0.png │ ├── index_6_1.png │ ├── index_7_0.png │ ├── index_7_01.png │ ├── index_7_02.png │ ├── index_7_03.png │ ├── index_7_1.png │ ├── index_8_0.png │ ├── index_8_01.png │ ├── index_8_02.png │ ├── index_9_0.png │ ├── index_9_01.png │ ├── index_9_02.png │ └── index_9_03.png ├── _sources │ ├── index.md.txt │ ├── 第一回:Matplotlib初相识 │ │ └── index.md.txt │ ├── 第三回:布局格式定方圆 │ │ └── index.md.txt │ ├── 第二回:艺术画笔见乾坤 │ │ └── index.md.txt │ ├── 第五回:样式色彩秀芳华 │ │ └── index.md.txt │ └── 第四回:文字图例尽眉目 │ │ └── index.md.txt ├── _static │ ├── __init__.py │ ├── __pycache__ │ │ └── __init__.cpython-39.pyc │ ├── basic.css │ ├── css │ │ ├── index.c5995385ac14fb8791e8eb36b4908be2.css │ │ └── theme.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── images │ │ ├── logo_binder.svg │ │ ├── logo_colab.png │ │ └── logo_jupyterhub.svg │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── js │ │ └── index.1c5a1a01449ed65a7b51.js │ ├── language_data.js │ ├── logo.png │ ├── minus.png │ ├── mystnb.css │ ├── plot_directive.css │ ├── plus.png │ ├── pygments.css │ ├── searchtools.js │ ├── sphinx-book-theme.12a9622fbb08dcb3a2a40b2c02b83a57.js │ ├── sphinx-book-theme.acff12b8f9c144ce68a297486a2fa670.css │ ├── sphinx-book-theme.css │ ├── togglebutton.css │ ├── togglebutton.js │ ├── underscore-1.12.0.js │ ├── underscore.js │ ├── vendor │ │ └── fontawesome │ │ │ └── 5.13.0 │ │ │ ├── LICENSE.txt │ │ │ ├── css │ │ │ └── all.min.css │ │ │ └── webfonts │ │ │ ├── fa-brands-400.eot │ │ │ ├── fa-brands-400.svg │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-brands-400.woff │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.eot │ │ │ ├── fa-regular-400.svg │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff │ │ │ ├── fa-regular-400.woff2 │ │ │ ├── fa-solid-900.eot │ │ │ ├── fa-solid-900.svg │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-solid-900.woff │ │ │ └── fa-solid-900.woff2 │ └── webpack-macros.html ├── doctrees │ ├── environment.pickle │ ├── glue_cache.json │ ├── index.doctree │ ├── 第一回:Matplotlib初相识 │ │ └── index.doctree │ ├── 第三回:布局格式定方圆 │ │ └── index.doctree │ ├── 第二回:艺术画笔见乾坤 │ │ └── index.doctree │ ├── 第五回:样式色彩秀芳华 │ │ └── index.doctree │ └── 第四回:文字图例尽眉目 │ │ └── index.doctree ├── genindex.html ├── index.html ├── objects.inv ├── reports │ └── index.log ├── search.html ├── searchindex.js ├── 第一回:Matplotlib初相识 │ └── index.html ├── 第三回:布局格式定方圆 │ └── index.html ├── 第二回:艺术画笔见乾坤 │ └── index.html ├── 第五回:样式色彩秀芳华 │ └── index.html └── 第四回:文字图例尽眉目 │ └── index.html ├── file └── presentation.mplstyle └── source ├── _static └── logo.png ├── conf.py ├── index.md ├── 第一回:Matplotlib初相识 └── index.md ├── 第三回:布局格式定方圆 └── index.md ├── 第二回:艺术画笔见乾坤 └── index.md ├── 第五回:样式色彩秀芳华 ├── file │ └── presentation.mplstyle └── index.md └── 第四回:文字图例尽眉目 └── index.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fantastic-Matplotlib 2 | 3 | ![](https://matplotlib.org/_static/logo2_compressed.svg) 4 | 5 | 本项目《Fantastic-Matplotlib》是Datawhale🐳数据可视化小组的一个开源项目。 6 | 7 | Matplotlib可以说是python数据可视化最重要且常见的工具之一,每一位和数据打交道的人几乎都不可避免要用到,此外也有大量的可视化工具是基于matplotlib做的二次开发。 8 | 9 | 设计这样一套开源教程的初衷在于笔者最初在用python做数据可视化时面临两大痛点, 10 | 11 | - 没有系统梳理matplotlib的绘图接口,常常是现用现查,用过即忘,效率极低 12 | - 没有深入理解matplotlib的设计框架,往往是只会复制粘贴,不知其所以然,面对复杂图表时一筹莫展 13 | 14 | 基于此,为了彻底解决这些痛点,笔者下定决心通读[官方文档](https://matplotlib.org/),相比于市面上的很多学习材料,官方文档的内容极为详细而全面,更重要的是,其阐明了matplotlib包的设计架构,这些对于我们掌握并应用是非常有帮助的。在通读完官方文档并结合一定的归纳总结与实践之后,笔者能明显察觉到对于matplotlib的理解上了一个层次。 15 | 16 | 如果屏幕前的你们,也正在面临以上说的这两个痛点,那么学习本项目教程将会是一个不错的选择。 17 | 18 | 本项目重点希望在两个层面帮助读者构建matplotlib的知识体系, 19 | 20 | - 从图形,布局,文本,样式等多维度系统梳理matplotlib的绘图方法,构建对于绘图方法的整体理解 21 | - 从绘图API层级,接口等方面阐明matplotlib的设计理念,摆脱只会复制粘贴的尴尬处境 22 | 23 | 最后还要说的是,对于学习完本教程的读者,若是仍然觉得学有余力不过瘾,强烈建议按需阅读官方文档,相信你一定会有所收获的。 24 | 25 | 关于本项目的名称,fantastic-matplotlib,在笔者精读过官网文档之后,才愈发觉得精妙,仿佛看到了一角下的广袤冰山,被它强大的功能和精巧的设计惊艳到了,之前对于matplotlib的了解还是过于浅薄,因此想用fantastic来表示笔者的感慨,也希望能够通过这样一个开源教程带领读者领略的matplotlib的精彩之处。 26 | 27 | 下图是该项目的大纲,总共五个章节介绍整个Fantastic-Matplotlib数据可视化项目。 28 | 29 | ![](https://img-blog.csdnimg.cn/20210530234005720.png) 30 | 31 | ## 使用说明 32 | 33 | - 使用前请将matplotlib升级至V3.4.2以上(2022年1月),否则可能会出现报错! 34 | - 本教程独立网站已上线:[https://datawhalechina.github.io/fantastic-matplotlib/](https://datawhalechina.github.io/fantastic-matplotlib/) 35 | - 使用时若发现任何问题,或是你对项目内容有好的建议,欢迎留言交流,联系邮箱skywateryang@126.com,微信`skywateryang` 36 | 37 | 38 | ## 目录 39 | 40 | * 第一回:Matplotlib初相识 41 | 42 | > 和matplotlib的初次邂逅,赶紧拿出画布,画笔,一段奇幻的旅途即将开启 43 | 44 | * 第二回:艺术画笔见乾坤 45 | 46 | > 挥舞起手中的艺术画笔,发挥想象力,在画布上自由地绘制图形 47 | 48 | * 第三回:布局格式定方圆 49 | 50 | > 没有规矩不成方圆,你应当开始学会如何合理地在画布上布局了 51 | 52 | * 第四回:文字图例尽眉目 53 | 54 | > 为了让你的画流传更久远,快来学习下如何在画布上题字吧 55 | 56 | * 第五回:样式色彩秀芳华 57 | 58 | > 下一步你需要学习下怎么样绘制出更加花样繁复,色彩绚丽的画了 59 | 60 | 61 | 62 | 63 | 64 | 65 | ## 致谢 66 | 67 | 感谢以下Datawhale成员对项目推进作出的贡献(排名不分先后): 68 | 69 | **贡献者名单** 70 | 71 | | 成员 | 个人简介 | 个人主页 | 72 | | ------ | ------------------------------------------- | -------------------------------------------------- | 73 | | 杨剑砺 | Datawhale成员,**项目负责人**,数据分析师 | 公众号:口羊的数据分析实验室 | 74 | | 杨煜 | Datawhale成员,数据分析师 | 公众号:BI数据可视化 | 75 | | 耿远昊 | Datawhale成员,华东师范大学在读 | Github:https://github.com/GYHHAHA | 76 | | 李运佳 | Datawhale成员,上海交通大学在读 | 知乎:https://www.zhihu.com/people/li-yun-jia-68-9 | 77 | | 居凤霞 | Datawhale成员,数据分析师,南瓜书项目贡献者 | | 78 | 79 | **项目贡献情况** 80 | 81 | > 《Fantastic-Matplotlib》V1.0 : 项目第一版上线 82 | 83 | 项目构建与整合:杨剑砺 84 | 85 | 第一章:杨剑砺 86 | 87 | 第二章:杨煜,居凤霞 88 | 89 | 第三章:耿远昊 90 | 91 | 第四章:李运佳 92 | 93 | 第五章:杨剑砺 94 | 95 | > 《Fantastic-Matplotlib》V1.1 :第一次全面更新 96 | 97 | 全部章节的更新完善:杨剑砺 98 | 99 | 100 | 101 | ## 关注我们 102 | 103 |
Datawhale是一个专注AI领域的开源组织,以“for the learner,和学习者一起成长”为愿景,构建对学习者最有价值的开源学习社区。关注我们,一起学习成长。
104 | 105 | ## LICENSE 106 | 107 | 知识共享许可协议 108 | 109 | 本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。 110 | -------------------------------------------------------------------------------- /data/iris.csv: -------------------------------------------------------------------------------- 1 | sepal_length,sepal_width,petal_length,petal_width,species 2 | 5.1,3.5,1.4,0.2,setosa 3 | 4.9,3.0,1.4,0.2,setosa 4 | 4.7,3.2,1.3,0.2,setosa 5 | 4.6,3.1,1.5,0.2,setosa 6 | 5.0,3.6,1.4,0.2,setosa 7 | 5.4,3.9,1.7,0.4,setosa 8 | 4.6,3.4,1.4,0.3,setosa 9 | 5.0,3.4,1.5,0.2,setosa 10 | 4.4,2.9,1.4,0.2,setosa 11 | 4.9,3.1,1.5,0.1,setosa 12 | 5.4,3.7,1.5,0.2,setosa 13 | 4.8,3.4,1.6,0.2,setosa 14 | 4.8,3.0,1.4,0.1,setosa 15 | 4.3,3.0,1.1,0.1,setosa 16 | 5.8,4.0,1.2,0.2,setosa 17 | 5.7,4.4,1.5,0.4,setosa 18 | 5.4,3.9,1.3,0.4,setosa 19 | 5.1,3.5,1.4,0.3,setosa 20 | 5.7,3.8,1.7,0.3,setosa 21 | 5.1,3.8,1.5,0.3,setosa 22 | 5.4,3.4,1.7,0.2,setosa 23 | 5.1,3.7,1.5,0.4,setosa 24 | 4.6,3.6,1.0,0.2,setosa 25 | 5.1,3.3,1.7,0.5,setosa 26 | 4.8,3.4,1.9,0.2,setosa 27 | 5.0,3.0,1.6,0.2,setosa 28 | 5.0,3.4,1.6,0.4,setosa 29 | 5.2,3.5,1.5,0.2,setosa 30 | 5.2,3.4,1.4,0.2,setosa 31 | 4.7,3.2,1.6,0.2,setosa 32 | 4.8,3.1,1.6,0.2,setosa 33 | 5.4,3.4,1.5,0.4,setosa 34 | 5.2,4.1,1.5,0.1,setosa 35 | 5.5,4.2,1.4,0.2,setosa 36 | 4.9,3.1,1.5,0.2,setosa 37 | 5.0,3.2,1.2,0.2,setosa 38 | 5.5,3.5,1.3,0.2,setosa 39 | 4.9,3.6,1.4,0.1,setosa 40 | 4.4,3.0,1.3,0.2,setosa 41 | 5.1,3.4,1.5,0.2,setosa 42 | 5.0,3.5,1.3,0.3,setosa 43 | 4.5,2.3,1.3,0.3,setosa 44 | 4.4,3.2,1.3,0.2,setosa 45 | 5.0,3.5,1.6,0.6,setosa 46 | 5.1,3.8,1.9,0.4,setosa 47 | 4.8,3.0,1.4,0.3,setosa 48 | 5.1,3.8,1.6,0.2,setosa 49 | 4.6,3.2,1.4,0.2,setosa 50 | 5.3,3.7,1.5,0.2,setosa 51 | 5.0,3.3,1.4,0.2,setosa 52 | 7.0,3.2,4.7,1.4,versicolor 53 | 6.4,3.2,4.5,1.5,versicolor 54 | 6.9,3.1,4.9,1.5,versicolor 55 | 5.5,2.3,4.0,1.3,versicolor 56 | 6.5,2.8,4.6,1.5,versicolor 57 | 5.7,2.8,4.5,1.3,versicolor 58 | 6.3,3.3,4.7,1.6,versicolor 59 | 4.9,2.4,3.3,1.0,versicolor 60 | 6.6,2.9,4.6,1.3,versicolor 61 | 5.2,2.7,3.9,1.4,versicolor 62 | 5.0,2.0,3.5,1.0,versicolor 63 | 5.9,3.0,4.2,1.5,versicolor 64 | 6.0,2.2,4.0,1.0,versicolor 65 | 6.1,2.9,4.7,1.4,versicolor 66 | 5.6,2.9,3.6,1.3,versicolor 67 | 6.7,3.1,4.4,1.4,versicolor 68 | 5.6,3.0,4.5,1.5,versicolor 69 | 5.8,2.7,4.1,1.0,versicolor 70 | 6.2,2.2,4.5,1.5,versicolor 71 | 5.6,2.5,3.9,1.1,versicolor 72 | 5.9,3.2,4.8,1.8,versicolor 73 | 6.1,2.8,4.0,1.3,versicolor 74 | 6.3,2.5,4.9,1.5,versicolor 75 | 6.1,2.8,4.7,1.2,versicolor 76 | 6.4,2.9,4.3,1.3,versicolor 77 | 6.6,3.0,4.4,1.4,versicolor 78 | 6.8,2.8,4.8,1.4,versicolor 79 | 6.7,3.0,5.0,1.7,versicolor 80 | 6.0,2.9,4.5,1.5,versicolor 81 | 5.7,2.6,3.5,1.0,versicolor 82 | 5.5,2.4,3.8,1.1,versicolor 83 | 5.5,2.4,3.7,1.0,versicolor 84 | 5.8,2.7,3.9,1.2,versicolor 85 | 6.0,2.7,5.1,1.6,versicolor 86 | 5.4,3.0,4.5,1.5,versicolor 87 | 6.0,3.4,4.5,1.6,versicolor 88 | 6.7,3.1,4.7,1.5,versicolor 89 | 6.3,2.3,4.4,1.3,versicolor 90 | 5.6,3.0,4.1,1.3,versicolor 91 | 5.5,2.5,4.0,1.3,versicolor 92 | 5.5,2.6,4.4,1.2,versicolor 93 | 6.1,3.0,4.6,1.4,versicolor 94 | 5.8,2.6,4.0,1.2,versicolor 95 | 5.0,2.3,3.3,1.0,versicolor 96 | 5.6,2.7,4.2,1.3,versicolor 97 | 5.7,3.0,4.2,1.2,versicolor 98 | 5.7,2.9,4.2,1.3,versicolor 99 | 6.2,2.9,4.3,1.3,versicolor 100 | 5.1,2.5,3.0,1.1,versicolor 101 | 5.7,2.8,4.1,1.3,versicolor 102 | 6.3,3.3,6.0,2.5,virginica 103 | 5.8,2.7,5.1,1.9,virginica 104 | 7.1,3.0,5.9,2.1,virginica 105 | 6.3,2.9,5.6,1.8,virginica 106 | 6.5,3.0,5.8,2.2,virginica 107 | 7.6,3.0,6.6,2.1,virginica 108 | 4.9,2.5,4.5,1.7,virginica 109 | 7.3,2.9,6.3,1.8,virginica 110 | 6.7,2.5,5.8,1.8,virginica 111 | 7.2,3.6,6.1,2.5,virginica 112 | 6.5,3.2,5.1,2.0,virginica 113 | 6.4,2.7,5.3,1.9,virginica 114 | 6.8,3.0,5.5,2.1,virginica 115 | 5.7,2.5,5.0,2.0,virginica 116 | 5.8,2.8,5.1,2.4,virginica 117 | 6.4,3.2,5.3,2.3,virginica 118 | 6.5,3.0,5.5,1.8,virginica 119 | 7.7,3.8,6.7,2.2,virginica 120 | 7.7,2.6,6.9,2.3,virginica 121 | 6.0,2.2,5.0,1.5,virginica 122 | 6.9,3.2,5.7,2.3,virginica 123 | 5.6,2.8,4.9,2.0,virginica 124 | 7.7,2.8,6.7,2.0,virginica 125 | 6.3,2.7,4.9,1.8,virginica 126 | 6.7,3.3,5.7,2.1,virginica 127 | 7.2,3.2,6.0,1.8,virginica 128 | 6.2,2.8,4.8,1.8,virginica 129 | 6.1,3.0,4.9,1.8,virginica 130 | 6.4,2.8,5.6,2.1,virginica 131 | 7.2,3.0,5.8,1.6,virginica 132 | 7.4,2.8,6.1,1.9,virginica 133 | 7.9,3.8,6.4,2.0,virginica 134 | 6.4,2.8,5.6,2.2,virginica 135 | 6.3,2.8,5.1,1.5,virginica 136 | 6.1,2.6,5.6,1.4,virginica 137 | 7.7,3.0,6.1,2.3,virginica 138 | 6.3,3.4,5.6,2.4,virginica 139 | 6.4,3.1,5.5,1.8,virginica 140 | 6.0,3.0,4.8,1.8,virginica 141 | 6.9,3.1,5.4,2.1,virginica 142 | 6.7,3.1,5.6,2.4,virginica 143 | 6.9,3.1,5.1,2.3,virginica 144 | 5.8,2.7,5.1,1.9,virginica 145 | 6.8,3.2,5.9,2.3,virginica 146 | 6.7,3.3,5.7,2.5,virginica 147 | 6.7,3.0,5.2,2.3,virginica 148 | 6.3,2.5,5.0,1.9,virginica 149 | 6.5,3.0,5.2,2.0,virginica 150 | 6.2,3.4,5.4,2.3,virginica 151 | 5.9,3.0,5.1,1.8,virginica 152 | -------------------------------------------------------------------------------- /data/layout_ex1.csv: -------------------------------------------------------------------------------- 1 | Time,Temperature 2 | 1981-01,17.71290322580645 3 | 1981-02,17.678571428571427 4 | 1981-03,13.499999999999998 5 | 1981-04,12.356666666666664 6 | 1981-05,9.490322580645161 7 | 1981-06,7.306666666666668 8 | 1981-07,7.5774193548387085 9 | 1981-08,7.2387096774193544 10 | 1981-09,10.143333333333333 11 | 1981-10,10.087096774193547 12 | 1981-11,11.890000000000002 13 | 1981-12,13.680645161290323 14 | 1982-01,16.567741935483873 15 | 1982-02,15.921428571428574 16 | 1982-03,14.93548387096774 17 | 1982-04,11.469999999999999 18 | 1982-05,9.583870967741932 19 | 1982-06,5.606666666666668 20 | 1982-07,4.641935483870967 21 | 1982-08,7.903225806451611 22 | 1982-09,7.28 23 | 1982-10,9.54516129032258 24 | 1982-11,12.486666666666668 25 | 1982-12,13.75483870967742 26 | 1983-01,13.180645161290323 27 | 1983-02,16.807142857142857 28 | 1983-03,15.777419354838708 29 | 1983-04,10.596666666666668 30 | 1983-05,10.116129032258065 31 | 1983-06,6.6 32 | 1983-07,6.8903225806451625 33 | 1983-08,8.706451612903226 34 | 1983-09,9.21 35 | 1983-10,10.312903225806451 36 | 1983-11,11.993333333333334 37 | 1983-12,14.396774193548387 38 | 1984-01,14.30967741935484 39 | 1984-02,14.944827586206896 40 | 1984-03,12.867741935483872 41 | 1984-04,10.75 42 | 1984-05,8.112903225806452 43 | 1984-06,7.7299999999999995 44 | 1984-07,5.987096774193548 45 | 1984-08,8.696774193548388 46 | 1984-09,8.046666666666665 47 | 1984-10,10.632258064516131 48 | 1984-11,12.623333333333337 49 | 1984-12,12.643333333333334 50 | 1985-01,14.219354838709675 51 | 1985-02,14.032142857142862 52 | 1985-03,15.877419354838711 53 | 1985-04,12.976666666666668 54 | 1985-05,9.41935483870968 55 | 1985-06,7.073333333333333 56 | 1985-07,6.135483870967743 57 | 1985-08,7.635483870967742 58 | 1985-09,8.803333333333333 59 | 1985-10,10.49032258064516 60 | 1985-11,13.073333333333332 61 | 1985-12,14.109677419354838 62 | 1986-01,13.825806451612904 63 | 1986-02,14.19642857142857 64 | 1986-03,14.69032258064516 65 | 1986-04,11.653333333333332 66 | 1986-05,10.274193548387096 67 | 1986-06,7.5266666666666655 68 | 1986-07,6.961290322580647 69 | 1986-08,7.387096774193547 70 | 1986-09,8.933333333333335 71 | 1986-10,9.683870967741935 72 | 1986-11,11.793333333333338 73 | 1986-12,12.935483870967742 74 | 1987-01,13.23548387096774 75 | 1987-02,13.88928571428571 76 | 1987-03,12.61935483870968 77 | 1987-04,12.250000000000004 78 | 1987-05,9.806451612903226 79 | 1987-06,8.273333333333335 80 | 1987-07,5.983870967741935 81 | 1987-08,8.022580645161288 82 | 1987-09,9.81 83 | 1987-10,10.238709677419354 84 | 1987-11,13.15 85 | 1987-12,13.254838709677417 86 | 1988-01,16.493548387096777 87 | 1988-02,14.524137931034483 88 | 1988-03,14.748387096774193 89 | 1988-04,12.833333333333332 90 | 1988-05,11.387096774193548 91 | 1988-06,8.386666666666667 92 | 1988-07,8.23225806451613 93 | 1988-08,8.725806451612902 94 | 1988-09,9.883333333333331 95 | 1988-10,10.89032258064516 96 | 1988-11,12.253333333333332 97 | 1988-12,15.436666666666666 98 | 1989-01,15.180645161290325 99 | 1989-02,16.371428571428574 100 | 1989-03,15.803225806451614 101 | 1989-04,12.563333333333334 102 | 1989-05,10.725806451612904 103 | 1989-06,6.5600000000000005 104 | 1989-07,6.332258064516127 105 | 1989-08,6.770967741935483 106 | 1989-09,8.486666666666668 107 | 1989-10,9.867741935483872 108 | 1989-11,12.876666666666667 109 | 1989-12,13.951612903225802 110 | 1990-01,15.57741935483871 111 | 1990-02,15.417857142857144 112 | 1990-03,14.83548387096774 113 | 1990-04,13.433333333333332 114 | 1990-05,9.748387096774193 115 | 1990-06,7.719999999999999 116 | 1990-07,8.183870967741935 117 | 1990-08,7.825806451612902 118 | 1990-09,9.166666666666666 119 | 1990-10,11.345161290322583 120 | 1990-11,12.656666666666666 121 | 1990-12,14.36774193548387 122 | -------------------------------------------------------------------------------- /data/tips.csv: -------------------------------------------------------------------------------- 1 | "total_bill","tip","sex","smoker","day","time","size" 2 | 16.99,1.01,"Female","No","Sun","Dinner",2 3 | 10.34,1.66,"Male","No","Sun","Dinner",3 4 | 21.01,3.5,"Male","No","Sun","Dinner",3 5 | 23.68,3.31,"Male","No","Sun","Dinner",2 6 | 24.59,3.61,"Female","No","Sun","Dinner",4 7 | 25.29,4.71,"Male","No","Sun","Dinner",4 8 | 8.77,2,"Male","No","Sun","Dinner",2 9 | 26.88,3.12,"Male","No","Sun","Dinner",4 10 | 15.04,1.96,"Male","No","Sun","Dinner",2 11 | 14.78,3.23,"Male","No","Sun","Dinner",2 12 | 10.27,1.71,"Male","No","Sun","Dinner",2 13 | 35.26,5,"Female","No","Sun","Dinner",4 14 | 15.42,1.57,"Male","No","Sun","Dinner",2 15 | 18.43,3,"Male","No","Sun","Dinner",4 16 | 14.83,3.02,"Female","No","Sun","Dinner",2 17 | 21.58,3.92,"Male","No","Sun","Dinner",2 18 | 10.33,1.67,"Female","No","Sun","Dinner",3 19 | 16.29,3.71,"Male","No","Sun","Dinner",3 20 | 16.97,3.5,"Female","No","Sun","Dinner",3 21 | 20.65,3.35,"Male","No","Sat","Dinner",3 22 | 17.92,4.08,"Male","No","Sat","Dinner",2 23 | 20.29,2.75,"Female","No","Sat","Dinner",2 24 | 15.77,2.23,"Female","No","Sat","Dinner",2 25 | 39.42,7.58,"Male","No","Sat","Dinner",4 26 | 19.82,3.18,"Male","No","Sat","Dinner",2 27 | 17.81,2.34,"Male","No","Sat","Dinner",4 28 | 13.37,2,"Male","No","Sat","Dinner",2 29 | 12.69,2,"Male","No","Sat","Dinner",2 30 | 21.7,4.3,"Male","No","Sat","Dinner",2 31 | 19.65,3,"Female","No","Sat","Dinner",2 32 | 9.55,1.45,"Male","No","Sat","Dinner",2 33 | 18.35,2.5,"Male","No","Sat","Dinner",4 34 | 15.06,3,"Female","No","Sat","Dinner",2 35 | 20.69,2.45,"Female","No","Sat","Dinner",4 36 | 17.78,3.27,"Male","No","Sat","Dinner",2 37 | 24.06,3.6,"Male","No","Sat","Dinner",3 38 | 16.31,2,"Male","No","Sat","Dinner",3 39 | 16.93,3.07,"Female","No","Sat","Dinner",3 40 | 18.69,2.31,"Male","No","Sat","Dinner",3 41 | 31.27,5,"Male","No","Sat","Dinner",3 42 | 16.04,2.24,"Male","No","Sat","Dinner",3 43 | 17.46,2.54,"Male","No","Sun","Dinner",2 44 | 13.94,3.06,"Male","No","Sun","Dinner",2 45 | 9.68,1.32,"Male","No","Sun","Dinner",2 46 | 30.4,5.6,"Male","No","Sun","Dinner",4 47 | 18.29,3,"Male","No","Sun","Dinner",2 48 | 22.23,5,"Male","No","Sun","Dinner",2 49 | 32.4,6,"Male","No","Sun","Dinner",4 50 | 28.55,2.05,"Male","No","Sun","Dinner",3 51 | 18.04,3,"Male","No","Sun","Dinner",2 52 | 12.54,2.5,"Male","No","Sun","Dinner",2 53 | 10.29,2.6,"Female","No","Sun","Dinner",2 54 | 34.81,5.2,"Female","No","Sun","Dinner",4 55 | 9.94,1.56,"Male","No","Sun","Dinner",2 56 | 25.56,4.34,"Male","No","Sun","Dinner",4 57 | 19.49,3.51,"Male","No","Sun","Dinner",2 58 | 38.01,3,"Male","Yes","Sat","Dinner",4 59 | 26.41,1.5,"Female","No","Sat","Dinner",2 60 | 11.24,1.76,"Male","Yes","Sat","Dinner",2 61 | 48.27,6.73,"Male","No","Sat","Dinner",4 62 | 20.29,3.21,"Male","Yes","Sat","Dinner",2 63 | 13.81,2,"Male","Yes","Sat","Dinner",2 64 | 11.02,1.98,"Male","Yes","Sat","Dinner",2 65 | 18.29,3.76,"Male","Yes","Sat","Dinner",4 66 | 17.59,2.64,"Male","No","Sat","Dinner",3 67 | 20.08,3.15,"Male","No","Sat","Dinner",3 68 | 16.45,2.47,"Female","No","Sat","Dinner",2 69 | 3.07,1,"Female","Yes","Sat","Dinner",1 70 | 20.23,2.01,"Male","No","Sat","Dinner",2 71 | 15.01,2.09,"Male","Yes","Sat","Dinner",2 72 | 12.02,1.97,"Male","No","Sat","Dinner",2 73 | 17.07,3,"Female","No","Sat","Dinner",3 74 | 26.86,3.14,"Female","Yes","Sat","Dinner",2 75 | 25.28,5,"Female","Yes","Sat","Dinner",2 76 | 14.73,2.2,"Female","No","Sat","Dinner",2 77 | 10.51,1.25,"Male","No","Sat","Dinner",2 78 | 17.92,3.08,"Male","Yes","Sat","Dinner",2 79 | 27.2,4,"Male","No","Thur","Lunch",4 80 | 22.76,3,"Male","No","Thur","Lunch",2 81 | 17.29,2.71,"Male","No","Thur","Lunch",2 82 | 19.44,3,"Male","Yes","Thur","Lunch",2 83 | 16.66,3.4,"Male","No","Thur","Lunch",2 84 | 10.07,1.83,"Female","No","Thur","Lunch",1 85 | 32.68,5,"Male","Yes","Thur","Lunch",2 86 | 15.98,2.03,"Male","No","Thur","Lunch",2 87 | 34.83,5.17,"Female","No","Thur","Lunch",4 88 | 13.03,2,"Male","No","Thur","Lunch",2 89 | 18.28,4,"Male","No","Thur","Lunch",2 90 | 24.71,5.85,"Male","No","Thur","Lunch",2 91 | 21.16,3,"Male","No","Thur","Lunch",2 92 | 28.97,3,"Male","Yes","Fri","Dinner",2 93 | 22.49,3.5,"Male","No","Fri","Dinner",2 94 | 5.75,1,"Female","Yes","Fri","Dinner",2 95 | 16.32,4.3,"Female","Yes","Fri","Dinner",2 96 | 22.75,3.25,"Female","No","Fri","Dinner",2 97 | 40.17,4.73,"Male","Yes","Fri","Dinner",4 98 | 27.28,4,"Male","Yes","Fri","Dinner",2 99 | 12.03,1.5,"Male","Yes","Fri","Dinner",2 100 | 21.01,3,"Male","Yes","Fri","Dinner",2 101 | 12.46,1.5,"Male","No","Fri","Dinner",2 102 | 11.35,2.5,"Female","Yes","Fri","Dinner",2 103 | 15.38,3,"Female","Yes","Fri","Dinner",2 104 | 44.3,2.5,"Female","Yes","Sat","Dinner",3 105 | 22.42,3.48,"Female","Yes","Sat","Dinner",2 106 | 20.92,4.08,"Female","No","Sat","Dinner",2 107 | 15.36,1.64,"Male","Yes","Sat","Dinner",2 108 | 20.49,4.06,"Male","Yes","Sat","Dinner",2 109 | 25.21,4.29,"Male","Yes","Sat","Dinner",2 110 | 18.24,3.76,"Male","No","Sat","Dinner",2 111 | 14.31,4,"Female","Yes","Sat","Dinner",2 112 | 14,3,"Male","No","Sat","Dinner",2 113 | 7.25,1,"Female","No","Sat","Dinner",1 114 | 38.07,4,"Male","No","Sun","Dinner",3 115 | 23.95,2.55,"Male","No","Sun","Dinner",2 116 | 25.71,4,"Female","No","Sun","Dinner",3 117 | 17.31,3.5,"Female","No","Sun","Dinner",2 118 | 29.93,5.07,"Male","No","Sun","Dinner",4 119 | 10.65,1.5,"Female","No","Thur","Lunch",2 120 | 12.43,1.8,"Female","No","Thur","Lunch",2 121 | 24.08,2.92,"Female","No","Thur","Lunch",4 122 | 11.69,2.31,"Male","No","Thur","Lunch",2 123 | 13.42,1.68,"Female","No","Thur","Lunch",2 124 | 14.26,2.5,"Male","No","Thur","Lunch",2 125 | 15.95,2,"Male","No","Thur","Lunch",2 126 | 12.48,2.52,"Female","No","Thur","Lunch",2 127 | 29.8,4.2,"Female","No","Thur","Lunch",6 128 | 8.52,1.48,"Male","No","Thur","Lunch",2 129 | 14.52,2,"Female","No","Thur","Lunch",2 130 | 11.38,2,"Female","No","Thur","Lunch",2 131 | 22.82,2.18,"Male","No","Thur","Lunch",3 132 | 19.08,1.5,"Male","No","Thur","Lunch",2 133 | 20.27,2.83,"Female","No","Thur","Lunch",2 134 | 11.17,1.5,"Female","No","Thur","Lunch",2 135 | 12.26,2,"Female","No","Thur","Lunch",2 136 | 18.26,3.25,"Female","No","Thur","Lunch",2 137 | 8.51,1.25,"Female","No","Thur","Lunch",2 138 | 10.33,2,"Female","No","Thur","Lunch",2 139 | 14.15,2,"Female","No","Thur","Lunch",2 140 | 16,2,"Male","Yes","Thur","Lunch",2 141 | 13.16,2.75,"Female","No","Thur","Lunch",2 142 | 17.47,3.5,"Female","No","Thur","Lunch",2 143 | 34.3,6.7,"Male","No","Thur","Lunch",6 144 | 41.19,5,"Male","No","Thur","Lunch",5 145 | 27.05,5,"Female","No","Thur","Lunch",6 146 | 16.43,2.3,"Female","No","Thur","Lunch",2 147 | 8.35,1.5,"Female","No","Thur","Lunch",2 148 | 18.64,1.36,"Female","No","Thur","Lunch",3 149 | 11.87,1.63,"Female","No","Thur","Lunch",2 150 | 9.78,1.73,"Male","No","Thur","Lunch",2 151 | 7.51,2,"Male","No","Thur","Lunch",2 152 | 14.07,2.5,"Male","No","Sun","Dinner",2 153 | 13.13,2,"Male","No","Sun","Dinner",2 154 | 17.26,2.74,"Male","No","Sun","Dinner",3 155 | 24.55,2,"Male","No","Sun","Dinner",4 156 | 19.77,2,"Male","No","Sun","Dinner",4 157 | 29.85,5.14,"Female","No","Sun","Dinner",5 158 | 48.17,5,"Male","No","Sun","Dinner",6 159 | 25,3.75,"Female","No","Sun","Dinner",4 160 | 13.39,2.61,"Female","No","Sun","Dinner",2 161 | 16.49,2,"Male","No","Sun","Dinner",4 162 | 21.5,3.5,"Male","No","Sun","Dinner",4 163 | 12.66,2.5,"Male","No","Sun","Dinner",2 164 | 16.21,2,"Female","No","Sun","Dinner",3 165 | 13.81,2,"Male","No","Sun","Dinner",2 166 | 17.51,3,"Female","Yes","Sun","Dinner",2 167 | 24.52,3.48,"Male","No","Sun","Dinner",3 168 | 20.76,2.24,"Male","No","Sun","Dinner",2 169 | 31.71,4.5,"Male","No","Sun","Dinner",4 170 | 10.59,1.61,"Female","Yes","Sat","Dinner",2 171 | 10.63,2,"Female","Yes","Sat","Dinner",2 172 | 50.81,10,"Male","Yes","Sat","Dinner",3 173 | 15.81,3.16,"Male","Yes","Sat","Dinner",2 174 | 7.25,5.15,"Male","Yes","Sun","Dinner",2 175 | 31.85,3.18,"Male","Yes","Sun","Dinner",2 176 | 16.82,4,"Male","Yes","Sun","Dinner",2 177 | 32.9,3.11,"Male","Yes","Sun","Dinner",2 178 | 17.89,2,"Male","Yes","Sun","Dinner",2 179 | 14.48,2,"Male","Yes","Sun","Dinner",2 180 | 9.6,4,"Female","Yes","Sun","Dinner",2 181 | 34.63,3.55,"Male","Yes","Sun","Dinner",2 182 | 34.65,3.68,"Male","Yes","Sun","Dinner",4 183 | 23.33,5.65,"Male","Yes","Sun","Dinner",2 184 | 45.35,3.5,"Male","Yes","Sun","Dinner",3 185 | 23.17,6.5,"Male","Yes","Sun","Dinner",4 186 | 40.55,3,"Male","Yes","Sun","Dinner",2 187 | 20.69,5,"Male","No","Sun","Dinner",5 188 | 20.9,3.5,"Female","Yes","Sun","Dinner",3 189 | 30.46,2,"Male","Yes","Sun","Dinner",5 190 | 18.15,3.5,"Female","Yes","Sun","Dinner",3 191 | 23.1,4,"Male","Yes","Sun","Dinner",3 192 | 15.69,1.5,"Male","Yes","Sun","Dinner",2 193 | 19.81,4.19,"Female","Yes","Thur","Lunch",2 194 | 28.44,2.56,"Male","Yes","Thur","Lunch",2 195 | 15.48,2.02,"Male","Yes","Thur","Lunch",2 196 | 16.58,4,"Male","Yes","Thur","Lunch",2 197 | 7.56,1.44,"Male","No","Thur","Lunch",2 198 | 10.34,2,"Male","Yes","Thur","Lunch",2 199 | 43.11,5,"Female","Yes","Thur","Lunch",4 200 | 13,2,"Female","Yes","Thur","Lunch",2 201 | 13.51,2,"Male","Yes","Thur","Lunch",2 202 | 18.71,4,"Male","Yes","Thur","Lunch",3 203 | 12.74,2.01,"Female","Yes","Thur","Lunch",2 204 | 13,2,"Female","Yes","Thur","Lunch",2 205 | 16.4,2.5,"Female","Yes","Thur","Lunch",2 206 | 20.53,4,"Male","Yes","Thur","Lunch",4 207 | 16.47,3.23,"Female","Yes","Thur","Lunch",3 208 | 26.59,3.41,"Male","Yes","Sat","Dinner",3 209 | 38.73,3,"Male","Yes","Sat","Dinner",4 210 | 24.27,2.03,"Male","Yes","Sat","Dinner",2 211 | 12.76,2.23,"Female","Yes","Sat","Dinner",2 212 | 30.06,2,"Male","Yes","Sat","Dinner",3 213 | 25.89,5.16,"Male","Yes","Sat","Dinner",4 214 | 48.33,9,"Male","No","Sat","Dinner",4 215 | 13.27,2.5,"Female","Yes","Sat","Dinner",2 216 | 28.17,6.5,"Female","Yes","Sat","Dinner",3 217 | 12.9,1.1,"Female","Yes","Sat","Dinner",2 218 | 28.15,3,"Male","Yes","Sat","Dinner",5 219 | 11.59,1.5,"Male","Yes","Sat","Dinner",2 220 | 7.74,1.44,"Male","Yes","Sat","Dinner",2 221 | 30.14,3.09,"Female","Yes","Sat","Dinner",4 222 | 12.16,2.2,"Male","Yes","Fri","Lunch",2 223 | 13.42,3.48,"Female","Yes","Fri","Lunch",2 224 | 8.58,1.92,"Male","Yes","Fri","Lunch",1 225 | 15.98,3,"Female","No","Fri","Lunch",3 226 | 13.42,1.58,"Male","Yes","Fri","Lunch",2 227 | 16.27,2.5,"Female","Yes","Fri","Lunch",2 228 | 10.09,2,"Female","Yes","Fri","Lunch",2 229 | 20.45,3,"Male","No","Sat","Dinner",4 230 | 13.28,2.72,"Male","No","Sat","Dinner",2 231 | 22.12,2.88,"Female","Yes","Sat","Dinner",2 232 | 24.01,2,"Male","Yes","Sat","Dinner",4 233 | 15.69,3,"Male","Yes","Sat","Dinner",3 234 | 11.61,3.39,"Male","No","Sat","Dinner",2 235 | 10.77,1.47,"Male","No","Sat","Dinner",2 236 | 15.53,3,"Male","Yes","Sat","Dinner",2 237 | 10.07,1.25,"Male","No","Sat","Dinner",2 238 | 12.6,1,"Male","Yes","Sat","Dinner",2 239 | 32.83,1.17,"Male","Yes","Sat","Dinner",2 240 | 35.83,4.67,"Female","No","Sat","Dinner",3 241 | 29.03,5.92,"Male","No","Sat","Dinner",3 242 | 27.18,2,"Female","Yes","Sat","Dinner",2 243 | 22.67,2,"Male","Yes","Sat","Dinner",2 244 | 17.82,1.75,"Male","No","Sat","Dinner",2 245 | 18.78,3,"Female","No","Thur","Dinner",2 246 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 815228cb4fe22cc72c32eeeb4cd16a8b 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/.nojekyll -------------------------------------------------------------------------------- /docs/_images/index_10_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_10_0.png -------------------------------------------------------------------------------- /docs/_images/index_10_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_10_01.png -------------------------------------------------------------------------------- /docs/_images/index_10_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_10_02.png -------------------------------------------------------------------------------- /docs/_images/index_11_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_11_0.png -------------------------------------------------------------------------------- /docs/_images/index_11_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_11_01.png -------------------------------------------------------------------------------- /docs/_images/index_11_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_11_02.png -------------------------------------------------------------------------------- /docs/_images/index_11_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_11_03.png -------------------------------------------------------------------------------- /docs/_images/index_12_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_12_0.png -------------------------------------------------------------------------------- /docs/_images/index_12_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_12_01.png -------------------------------------------------------------------------------- /docs/_images/index_12_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_12_02.png -------------------------------------------------------------------------------- /docs/_images/index_12_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_12_03.png -------------------------------------------------------------------------------- /docs/_images/index_13_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_13_0.png -------------------------------------------------------------------------------- /docs/_images/index_13_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_13_01.png -------------------------------------------------------------------------------- /docs/_images/index_13_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_13_02.png -------------------------------------------------------------------------------- /docs/_images/index_14_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_14_0.png -------------------------------------------------------------------------------- /docs/_images/index_14_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_14_01.png -------------------------------------------------------------------------------- /docs/_images/index_14_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_14_02.png -------------------------------------------------------------------------------- /docs/_images/index_14_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_14_03.png -------------------------------------------------------------------------------- /docs/_images/index_15_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_15_0.png -------------------------------------------------------------------------------- /docs/_images/index_15_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_15_01.png -------------------------------------------------------------------------------- /docs/_images/index_15_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_15_02.png -------------------------------------------------------------------------------- /docs/_images/index_16_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_16_0.png -------------------------------------------------------------------------------- /docs/_images/index_16_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_16_01.png -------------------------------------------------------------------------------- /docs/_images/index_16_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_16_02.png -------------------------------------------------------------------------------- /docs/_images/index_17_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_17_0.png -------------------------------------------------------------------------------- /docs/_images/index_17_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_17_01.png -------------------------------------------------------------------------------- /docs/_images/index_17_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_17_02.png -------------------------------------------------------------------------------- /docs/_images/index_17_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_17_03.png -------------------------------------------------------------------------------- /docs/_images/index_18_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_18_0.png -------------------------------------------------------------------------------- /docs/_images/index_18_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_18_01.png -------------------------------------------------------------------------------- /docs/_images/index_18_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_18_1.png -------------------------------------------------------------------------------- /docs/_images/index_19_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_19_0.png -------------------------------------------------------------------------------- /docs/_images/index_19_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_19_01.png -------------------------------------------------------------------------------- /docs/_images/index_19_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_19_02.png -------------------------------------------------------------------------------- /docs/_images/index_1_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_1_0.png -------------------------------------------------------------------------------- /docs/_images/index_20_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_20_0.png -------------------------------------------------------------------------------- /docs/_images/index_20_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_20_01.png -------------------------------------------------------------------------------- /docs/_images/index_21_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_21_0.png -------------------------------------------------------------------------------- /docs/_images/index_21_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_21_01.png -------------------------------------------------------------------------------- /docs/_images/index_21_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_21_02.png -------------------------------------------------------------------------------- /docs/_images/index_21_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_21_03.png -------------------------------------------------------------------------------- /docs/_images/index_21_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_21_1.png -------------------------------------------------------------------------------- /docs/_images/index_22_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_22_0.png -------------------------------------------------------------------------------- /docs/_images/index_22_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_22_01.png -------------------------------------------------------------------------------- /docs/_images/index_23_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_23_0.png -------------------------------------------------------------------------------- /docs/_images/index_23_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_23_01.png -------------------------------------------------------------------------------- /docs/_images/index_23_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_23_02.png -------------------------------------------------------------------------------- /docs/_images/index_24_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_24_0.png -------------------------------------------------------------------------------- /docs/_images/index_24_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_24_01.png -------------------------------------------------------------------------------- /docs/_images/index_25_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_25_0.png -------------------------------------------------------------------------------- /docs/_images/index_25_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_25_01.png -------------------------------------------------------------------------------- /docs/_images/index_25_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_25_02.png -------------------------------------------------------------------------------- /docs/_images/index_26_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_26_0.png -------------------------------------------------------------------------------- /docs/_images/index_26_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_26_01.png -------------------------------------------------------------------------------- /docs/_images/index_27_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_27_0.png -------------------------------------------------------------------------------- /docs/_images/index_27_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_27_01.png -------------------------------------------------------------------------------- /docs/_images/index_27_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_27_02.png -------------------------------------------------------------------------------- /docs/_images/index_28_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_28_0.png -------------------------------------------------------------------------------- /docs/_images/index_28_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_28_01.png -------------------------------------------------------------------------------- /docs/_images/index_29_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_29_0.png -------------------------------------------------------------------------------- /docs/_images/index_29_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_29_01.png -------------------------------------------------------------------------------- /docs/_images/index_29_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_29_1.png -------------------------------------------------------------------------------- /docs/_images/index_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_2_0.png -------------------------------------------------------------------------------- /docs/_images/index_2_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_2_01.png -------------------------------------------------------------------------------- /docs/_images/index_2_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_2_02.png -------------------------------------------------------------------------------- /docs/_images/index_30_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_30_0.png -------------------------------------------------------------------------------- /docs/_images/index_30_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_30_1.png -------------------------------------------------------------------------------- /docs/_images/index_31_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_31_0.png -------------------------------------------------------------------------------- /docs/_images/index_31_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_31_01.png -------------------------------------------------------------------------------- /docs/_images/index_31_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_31_1.png -------------------------------------------------------------------------------- /docs/_images/index_32_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_32_0.png -------------------------------------------------------------------------------- /docs/_images/index_33_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_33_0.png -------------------------------------------------------------------------------- /docs/_images/index_33_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_33_01.png -------------------------------------------------------------------------------- /docs/_images/index_34_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_34_0.png -------------------------------------------------------------------------------- /docs/_images/index_35_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_35_0.png -------------------------------------------------------------------------------- /docs/_images/index_35_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_35_01.png -------------------------------------------------------------------------------- /docs/_images/index_35_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_35_1.png -------------------------------------------------------------------------------- /docs/_images/index_36_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_36_1.png -------------------------------------------------------------------------------- /docs/_images/index_37_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_37_0.png -------------------------------------------------------------------------------- /docs/_images/index_37_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_37_01.png -------------------------------------------------------------------------------- /docs/_images/index_37_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_37_1.png -------------------------------------------------------------------------------- /docs/_images/index_38_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_38_0.png -------------------------------------------------------------------------------- /docs/_images/index_39_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_39_0.png -------------------------------------------------------------------------------- /docs/_images/index_3_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_3_0.png -------------------------------------------------------------------------------- /docs/_images/index_3_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_3_01.png -------------------------------------------------------------------------------- /docs/_images/index_3_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_3_02.png -------------------------------------------------------------------------------- /docs/_images/index_3_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_3_03.png -------------------------------------------------------------------------------- /docs/_images/index_40_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_40_0.png -------------------------------------------------------------------------------- /docs/_images/index_41_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_41_0.png -------------------------------------------------------------------------------- /docs/_images/index_4_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_4_0.png -------------------------------------------------------------------------------- /docs/_images/index_4_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_4_01.png -------------------------------------------------------------------------------- /docs/_images/index_4_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_4_02.png -------------------------------------------------------------------------------- /docs/_images/index_5_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_5_0.png -------------------------------------------------------------------------------- /docs/_images/index_5_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_5_01.png -------------------------------------------------------------------------------- /docs/_images/index_5_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_5_02.png -------------------------------------------------------------------------------- /docs/_images/index_6_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_6_0.png -------------------------------------------------------------------------------- /docs/_images/index_6_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_6_1.png -------------------------------------------------------------------------------- /docs/_images/index_7_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_7_0.png -------------------------------------------------------------------------------- /docs/_images/index_7_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_7_01.png -------------------------------------------------------------------------------- /docs/_images/index_7_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_7_02.png -------------------------------------------------------------------------------- /docs/_images/index_7_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_7_03.png -------------------------------------------------------------------------------- /docs/_images/index_7_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_7_1.png -------------------------------------------------------------------------------- /docs/_images/index_8_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_8_0.png -------------------------------------------------------------------------------- /docs/_images/index_8_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_8_01.png -------------------------------------------------------------------------------- /docs/_images/index_8_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_8_02.png -------------------------------------------------------------------------------- /docs/_images/index_9_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_9_0.png -------------------------------------------------------------------------------- /docs/_images/index_9_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_9_01.png -------------------------------------------------------------------------------- /docs/_images/index_9_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_9_02.png -------------------------------------------------------------------------------- /docs/_images/index_9_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_images/index_9_03.png -------------------------------------------------------------------------------- /docs/_sources/index.md.txt: -------------------------------------------------------------------------------- 1 | # Content 2 | 3 | 4 | 5 | ```{toctree} 6 | :maxdepth: 2 7 | 8 | 9 | 第一回:Matplotlib初相识/index 10 | 第二回:艺术画笔见乾坤/index 11 | 第三回:布局格式定方圆/index 12 | 第四回:文字图例尽眉目/index 13 | 第五回:样式色彩秀芳华/index 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/_sources/第一回:Matplotlib初相识/index.md.txt: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | text_representation: 4 | format_name: myst 5 | kernelspec: 6 | display_name: Python 3 7 | name: python3 8 | --- 9 | # 第一回:Matplotlib初相识 10 | 11 | 12 | 13 | ## 一、认识matplotlib 14 | 15 | Matplotlib是一个Python 2D绘图库,能够以多种硬拷贝格式和跨平台的交互式环境生成出版物质量的图形,用来绘制各种静态,动态,交互式的图表。 16 | 17 | Matplotlib可用于Python脚本,Python和IPython Shell、Jupyter notebook,Web应用程序服务器和各种图形用户界面工具包等。 18 | 19 | Matplotlib是Python数据可视化库中的泰斗,它已经成为python中公认的数据可视化工具,我们所熟知的pandas和seaborn的绘图接口其实也是基于matplotlib所作的高级封装。 20 | 21 | 为了对matplotlib有更好的理解,让我们从一些最基本的概念开始认识它,再逐渐过渡到一些高级技巧中。 22 | 23 | ## 二、一个最简单的绘图例子 24 | 25 | Matplotlib的图像是画在figure(如windows,jupyter窗体)上的,每一个figure又包含了一个或多个axes(一个可以指定坐标系的子区域)。最简单的创建figure以及axes的方式是通过`pyplot.subplots`命令,创建axes以后,可以使用`Axes.plot`绘制最简易的折线图。 26 | 27 | 28 | ```{code-cell} ipython3 29 | import matplotlib.pyplot as plt 30 | import matplotlib as mpl 31 | import numpy as np 32 | ``` 33 | 34 | 35 | ```{code-cell} ipython3 36 | fig, ax = plt.subplots() # 创建一个包含一个axes的figure 37 | ax.plot([1, 2, 3, 4], [1, 4, 2, 3]); # 绘制图像 38 | ``` 39 | 40 | **Trick**: 41 | 在jupyter notebook中使用matplotlib时会发现,代码运行后自动打印出类似``这样一段话,这是因为matplotlib的绘图代码默认打印出最后一个对象。如果不想显示这句话,有以下三种方法,在本章节的代码示例中你能找到这三种方法的使用。 42 | 43 | 1. 在代码块最后加一个分号`;` 44 | 2. 在代码块最后加一句plt.show() 45 | 3. 在绘图时将绘图对象显式赋值给一个变量,如将plt.plot([1, 2, 3, 4]) 改成line =plt.plot([1, 2, 3, 4]) 46 | 47 | 48 | 49 | 和MATLAB命令类似,你还可以通过一种更简单的方式绘制图像,`matplotlib.pyplot`方法能够直接在当前axes上绘制图像,如果用户未指定axes,matplotlib会帮你自动创建一个。所以上面的例子也可以简化为以下这一行代码。 50 | 51 | 52 | ```{code-cell} ipython3 53 | line =plt.plot([1, 2, 3, 4], [1, 4, 2, 3]) 54 | ``` 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | ## 三、Figure的组成 65 | 66 | 现在我们来深入看一下figure的组成。通过一张figure解剖图,我们可以看到一个完整的matplotlib图像通常会包括以下四个层级,这些层级也被称为容器(container),下一节会详细介绍。在matplotlib的世界中,我们将通过各种命令方法来操纵图像中的每一个部分,从而达到数据可视化的最终效果,一副完整的图像实际上是各类子元素的集合。 67 | 68 | - `Figure`:顶层级,用来容纳所有绘图元素 69 | 70 | - `Axes`:matplotlib宇宙的核心,容纳了大量元素用来构造一幅幅子图,一个figure可以由一个或多个子图组成 71 | 72 | - `Axis`:axes的下属层级,用于处理所有和坐标轴,网格有关的元素 73 | 74 | - `Tick`:axis的下属层级,用来处理所有和刻度有关的元素 75 | 76 | ![](https://matplotlib.org/_images/anatomy.png) 77 | 78 | ## 四、两种绘图接口 79 | 80 | matplotlib提供了两种最常用的绘图接口 81 | 82 | 1. 显式创建figure和axes,在上面调用绘图方法,也被称为OO模式(object-oriented style) 83 | 84 | 2. 依赖pyplot自动创建figure和axes,并绘图 85 | 86 | 使用第一种绘图接口,是这样的: 87 | 88 | 89 | ```{code-cell} ipython3 90 | x = np.linspace(0, 2, 100) 91 | 92 | fig, ax = plt.subplots() 93 | ax.plot(x, x, label='linear') 94 | ax.plot(x, x**2, label='quadratic') 95 | ax.plot(x, x**3, label='cubic') 96 | ax.set_xlabel('x label') 97 | ax.set_ylabel('y label') 98 | ax.set_title("Simple Plot") 99 | ax.legend() 100 | plt.show() 101 | ``` 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 而如果采用第二种绘图接口,绘制同样的图,代码是这样的: 114 | 115 | 116 | ```{code-cell} ipython3 117 | x = np.linspace(0, 2, 100) 118 | 119 | plt.plot(x, x, label='linear') 120 | plt.plot(x, x**2, label='quadratic') 121 | plt.plot(x, x**3, label='cubic') 122 | plt.xlabel('x label') 123 | plt.ylabel('y label') 124 | plt.title("Simple Plot") 125 | plt.legend() 126 | plt.show() 127 | ``` 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | ## 五、通用绘图模板 137 | 由于matplotlib的知识点非常繁杂,在实际使用过程中也不可能将全部API都记住,很多时候都是边用边查。因此这里提供一个通用的绘图基础模板,任何复杂的图表几乎都可以基于这个模板骨架填充内容而成。初学者刚开始学习时只需要牢记这一模板就足以应对大部分简单图表的绘制,在学习过程中可以将这个模板模块化,了解每个模块在做什么,在绘制复杂图表时如何修改,填充对应的模块。 138 | 139 | 140 | ```{code-cell} ipython3 141 | # step1 准备数据 142 | x = np.linspace(0, 2, 100) 143 | y = x**2 144 | 145 | # step2 设置绘图样式,这一模块的扩展参考第五章进一步学习,这一步不是必须的,样式也可以在绘制图像是进行设置 146 | mpl.rc('lines', linewidth=4, linestyle='-.') 147 | 148 | # step3 定义布局, 这一模块的扩展参考第三章进一步学习 149 | fig, ax = plt.subplots() 150 | 151 | # step4 绘制图像, 这一模块的扩展参考第二章进一步学习 152 | ax.plot(x, y, label='linear') 153 | 154 | # step5 添加标签,文字和图例,这一模块的扩展参考第四章进一步学习 155 | ax.set_xlabel('x label') 156 | ax.set_ylabel('y label') 157 | ax.set_title("Simple Plot") 158 | ax.legend() ; 159 | ``` 160 | 161 | 162 | 163 | 164 | ​ 165 | 166 | ## 思考题 167 | - 请思考两种绘图模式的优缺点和各自适合的使用场景 168 | - 在第五节绘图模板中我们是以OO模式作为例子展示的,请思考并写一个pyplot绘图模式的简单模板 169 | 170 | -------------------------------------------------------------------------------- /docs/_sources/第三回:布局格式定方圆/index.md.txt: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | text_representation: 4 | format_name: myst 5 | kernelspec: 6 | display_name: Python 3 7 | name: python3 8 | --- 9 | 10 | # 第三回:布局格式定方圆 11 | 12 | 13 | ```{code-cell} ipython3 14 | import numpy as np 15 | import pandas as pd 16 | import matplotlib.pyplot as plt 17 | plt.rcParams['font.sans-serif'] = ['SimHei'] #用来正常显示中文标签 18 | plt.rcParams['axes.unicode_minus'] = False #用来正常显示负号 19 | ``` 20 | 21 | ## 一、子图 22 | 23 | ### 1. 使用 `plt.subplots` 绘制均匀状态下的子图 24 | 25 | 返回元素分别是画布和子图构成的列表,第一个数字为行,第二个为列,不传入时默认值都为1 26 | 27 | `figsize` 参数可以指定整个画布的大小 28 | 29 | `sharex` 和 `sharey` 分别表示是否共享横轴和纵轴刻度 30 | 31 | `tight_layout` 函数可以调整子图的相对大小使字符不会重叠 32 | 33 | 34 | ```{code-cell} ipython3 35 | fig, axs = plt.subplots(2, 5, figsize=(10, 4), sharex=True, sharey=True) 36 | fig.suptitle('样例1', size=20) 37 | for i in range(2): 38 | for j in range(5): 39 | axs[i][j].scatter(np.random.randn(10), np.random.randn(10)) 40 | axs[i][j].set_title('第%d行,第%d列'%(i+1,j+1)) 41 | axs[i][j].set_xlim(-5,5) 42 | axs[i][j].set_ylim(-5,5) 43 | if i==1: axs[i][j].set_xlabel('横坐标') 44 | if j==0: axs[i][j].set_ylabel('纵坐标') 45 | fig.tight_layout() 46 | ``` 47 | 48 | 49 | ​ 50 | ​ 51 | 52 | 53 | `subplots`是基于OO模式的写法,显式创建一个或多个axes对象,然后在对应的子图对象上进行绘图操作。 54 | 还有种方式是使用`subplot`这样基于pyplot模式的写法,每次在指定位置新建一个子图,并且之后的绘图操作都会指向当前子图,本质上`subplot`也是`Figure.add_subplot`的一种封装。 55 | 56 | 在调用`subplot`时一般需要传入三位数字,分别代表总行数,总列数,当前子图的index 57 | 58 | 59 | ```{code-cell} ipython3 60 | plt.figure() 61 | # 子图1 62 | plt.subplot(2,2,1) 63 | plt.plot([1,2], 'r') 64 | # 子图2 65 | plt.subplot(2,2,2) 66 | plt.plot([1,2], 'b') 67 | #子图3 68 | plt.subplot(224) # 当三位数都小于10时,可以省略中间的逗号,这行命令等价于plt.subplot(2,2,4) 69 | plt.plot([1,2], 'g'); 70 | ``` 71 | 72 | 73 | ​ 74 | 75 | ​ 76 | 77 | 78 | 除了常规的直角坐标系,也可以通过`projection`方法创建极坐标系下的图表 79 | 80 | 81 | ```{code-cell} ipython3 82 | N = 150 83 | r = 2 * np.random.rand(N) 84 | theta = 2 * np.pi * np.random.rand(N) 85 | area = 200 * r**2 86 | colors = theta 87 | 88 | 89 | plt.subplot(projection='polar') 90 | plt.scatter(theta, r, c=colors, s=area, cmap='hsv', alpha=0.75); 91 | ``` 92 | 93 | 94 | ```{admonition} 练一练 95 |

请思考如何用极坐标系画出类似的玫瑰图

96 | 97 | 98 | ``` 99 | 100 | 101 | 102 | 103 | ### 2. 使用 `GridSpec` 绘制非均匀子图 104 | 105 | 所谓非均匀包含两层含义,第一是指图的比例大小不同但没有跨行或跨列,第二是指图为跨列或跨行状态 106 | 107 | 利用 `add_gridspec` 可以指定相对宽度比例 `width_ratios` 和相对高度比例参数 `height_ratios` 108 | 109 | 110 | ```{code-cell} ipython3 111 | fig = plt.figure(figsize=(10, 4)) 112 | spec = fig.add_gridspec(nrows=2, ncols=5, width_ratios=[1,2,3,4,5], height_ratios=[1,3]) 113 | fig.suptitle('样例2', size=20) 114 | for i in range(2): 115 | for j in range(5): 116 | ax = fig.add_subplot(spec[i, j]) 117 | ax.scatter(np.random.randn(10), np.random.randn(10)) 118 | ax.set_title('第%d行,第%d列'%(i+1,j+1)) 119 | if i==1: ax.set_xlabel('横坐标') 120 | if j==0: ax.set_ylabel('纵坐标') 121 | fig.tight_layout() 122 | ``` 123 | 124 | 125 | ​ 126 | 127 | ​ 128 | 129 | 130 | 在上面的例子中出现了 `spec[i, j]` 的用法,事实上通过切片就可以实现子图的合并而达到跨图的共能 131 | 132 | 133 | ```{code-cell} ipython3 134 | fig = plt.figure(figsize=(10, 4)) 135 | spec = fig.add_gridspec(nrows=2, ncols=6, width_ratios=[2,2.5,3,1,1.5,2], height_ratios=[1,2]) 136 | fig.suptitle('样例3', size=20) 137 | # sub1 138 | ax = fig.add_subplot(spec[0, :3]) 139 | ax.scatter(np.random.randn(10), np.random.randn(10)) 140 | # sub2 141 | ax = fig.add_subplot(spec[0, 3:5]) 142 | ax.scatter(np.random.randn(10), np.random.randn(10)) 143 | # sub3 144 | ax = fig.add_subplot(spec[:, 5]) 145 | ax.scatter(np.random.randn(10), np.random.randn(10)) 146 | # sub4 147 | ax = fig.add_subplot(spec[1, 0]) 148 | ax.scatter(np.random.randn(10), np.random.randn(10)) 149 | # sub5 150 | ax = fig.add_subplot(spec[1, 1:5]) 151 | ax.scatter(np.random.randn(10), np.random.randn(10)) 152 | fig.tight_layout() 153 | ``` 154 | 155 | 156 | ​ 157 | 158 | ​ 159 | 160 | 161 | ## 二、子图上的方法 162 | 163 | 补充介绍一些子图上的方法 164 | 165 | 常用直线的画法为: `axhline, axvline, axline` (水平、垂直、任意方向) 166 | 167 | 168 | ```{code-cell} ipython3 169 | fig, ax = plt.subplots(figsize=(4,3)) 170 | ax.axhline(0.5,0.2,0.8) 171 | ax.axvline(0.5,0.2,0.8) 172 | ax.axline([0.3,0.3],[0.7,0.7]); 173 | ``` 174 | 175 | 176 | ​ 177 | 178 | ​ 179 | 180 | 181 | 使用 `grid` 可以加灰色网格 182 | 183 | 184 | ```{code-cell} ipython3 185 | fig, ax = plt.subplots(figsize=(4,3)) 186 | ax.grid(True) 187 | ``` 188 | 189 | 190 | ​ 191 | 192 | ​ 193 | 194 | 195 | 使用 `set_xscale` 可以设置坐标轴的规度(指对数坐标等) 196 | 197 | 198 | ```{code-cell} ipython3 199 | fig, axs = plt.subplots(1, 2, figsize=(10, 4)) 200 | for j in range(2): 201 | axs[j].plot(list('abcd'), [10**i for i in range(4)]) 202 | if j==0: 203 | axs[j].set_yscale('log') 204 | else: 205 | pass 206 | fig.tight_layout() 207 | ``` 208 | 209 | 210 | ​ 211 | 212 | ​ 213 | 214 | 215 | ## 思考题 216 | 217 | - 墨尔本1981年至1990年的每月温度情况 218 | 219 | 数据集来自github仓库下data/layout_ex1.csv 220 | 请利用数据,画出如下的图: 221 | 222 | 223 | 224 | 225 | 226 | - 画出数据的散点图和边际分布 227 | 228 | 用 `np.random.randn(2, 150)` 生成一组二维数据,使用两种非均匀子图的分割方法,做出该数据对应的散点图和边际分布图 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | -------------------------------------------------------------------------------- /docs/_sources/第五回:样式色彩秀芳华/index.md.txt: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | text_representation: 4 | format_name: myst 5 | kernelspec: 6 | display_name: Python 3 7 | name: python3 8 | --- 9 | # 第五回:样式色彩秀芳华 10 | ```{code-cell} ipython3 11 | import matplotlib as mpl 12 | import matplotlib.pyplot as plt 13 | import numpy as np 14 | ``` 15 | 16 | 第五回详细介绍matplotlib中样式和颜色的使用,绘图样式和颜色是丰富可视化图表的重要手段,因此熟练掌握本章可以让可视化图表变得更美观,突出重点和凸显艺术性。 17 | 关于绘图样式,常见的有3种方法,分别是修改预定义样式,自定义样式和rcparams。 18 | 关于颜色使用,本章介绍了常见的5种表示单色颜色的基本方法,以及colormap多色显示的方法。 19 | 20 | ## 一、matplotlib的绘图样式(style) 21 | 22 | 在matplotlib中,要想设置绘制样式,最简单的方法是在绘制元素时单独设置样式。 23 | 但是有时候,当用户在做专题报告时,往往会希望保持整体风格的统一而不用对每张图一张张修改,因此matplotlib库还提供了四种批量修改全局样式的方式 24 | 25 | ### 1.matplotlib预先定义样式 26 | 27 | matplotlib贴心地提供了许多内置的样式供用户使用,使用方法很简单,只需在python脚本的最开始输入想使用style的名称即可调用,尝试调用不同内置样式,比较区别 28 | 29 | 30 | 31 | 32 | 33 | ```{code-cell} ipython3 34 | plt.style.use('default') 35 | plt.plot([1,2,3,4],[2,3,4,5]); 36 | ``` 37 | 38 | 39 | 40 | 41 | 42 | 43 | ```{code-cell} ipython3 44 | plt.style.use('ggplot') 45 | plt.plot([1,2,3,4],[2,3,4,5]); 46 | ``` 47 | 48 | 49 | 50 | 51 | 52 | 53 | 那么matplotlib究竟内置了那些样式供使用呢?总共以下26种丰富的样式可供选择。 54 | 55 | 56 | ```{code-cell} ipython3 57 | print(plt.style.available) 58 | ``` 59 | 60 | 61 | 62 | 63 | ### 2.用户自定义stylesheet 64 | 65 | 在任意路径下创建一个后缀名为mplstyle的样式清单,编辑文件添加以下样式内容 66 | 67 | > axes.titlesize : 24 68 | > axes.labelsize : 20 69 | > lines.linewidth : 3 70 | > lines.markersize : 10 71 | > xtick.labelsize : 16 72 | > ytick.labelsize : 16 73 | 74 | 引用自定义stylesheet后观察图表变化。 75 | 76 | 77 | ```{code-cell} ipython3 78 | plt.style.use('file/presentation.mplstyle') 79 | plt.plot([1,2,3,4],[2,3,4,5]); 80 | ``` 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 值得特别注意的是,matplotlib支持混合样式的引用,只需在引用时输入一个样式列表,若是几个样式中涉及到同一个参数,右边的样式表会覆盖左边的值。 89 | 90 | 91 | ```{code-cell} ipython3 92 | plt.style.use(['dark_background', 'file/presentation.mplstyle']) 93 | plt.plot([1,2,3,4],[2,3,4,5]); 94 | ``` 95 | 96 | 97 | 98 | 99 | 100 | 101 | ### 3.设置rcparams 102 | 103 | 我们还可以通过修改默认rc设置的方式改变样式,所有rc设置都保存在一个叫做 matplotlib.rcParams的变量中。 104 | 修改过后再绘图,可以看到绘图样式发生了变化。 105 | 106 | ```{code-cell} ipython3 107 | plt.style.use('default') # 恢复到默认样式 108 | plt.plot([1,2,3,4],[2,3,4,5]); 109 | ``` 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | ```{code-cell} ipython3 118 | mpl.rcParams['lines.linewidth'] = 2 119 | mpl.rcParams['lines.linestyle'] = '--' 120 | plt.plot([1,2,3,4],[2,3,4,5]); 121 | ``` 122 | 123 | 124 | 125 | 126 | 127 | 128 | 另外matplotlib也还提供了一种更便捷的修改样式方式,可以一次性修改多个样式。 129 | 130 | 131 | ```{code-cell} ipython3 132 | mpl.rc('lines', linewidth=4, linestyle='-.') 133 | plt.plot([1,2,3,4],[2,3,4,5]); 134 | ``` 135 | 136 | 137 | 138 | ## 二、matplotlib的色彩设置(color) 139 | 140 | 在可视化中,如何选择合适的颜色和搭配组合也是需要仔细考虑的,色彩选择要能够反映出可视化图像的主旨。 141 | 从可视化编码的角度对颜色进行分析,可以将颜色分为`色相、亮度和饱和度`三个视觉通道。通常来说: 142 | `色相`: 没有明显的顺序性、一般不用来表达数据量的高低,而是用来表达数据列的类别。 143 | `明度和饱和度`: 在视觉上很容易区分出优先级的高低、被用作表达顺序或者表达数据量视觉通道。 144 | 具体关于色彩理论部分的知识,不属于本教程的重点,请参阅有关拓展材料学习。 145 | [学会这6个可视化配色基本技巧,还原数据本身的意义](https://zhuanlan.zhihu.com/p/88892542) 146 | 147 | 在matplotlib中,设置颜色有以下几种方式: 148 | 149 | ### 1.RGB或RGBA 150 | 151 | 152 | ```{code-cell} ipython3 153 | plt.style.use('default') 154 | ``` 155 | 156 | 157 | ```{code-cell} ipython3 158 | # 颜色用[0,1]之间的浮点数表示,四个分量按顺序分别为(red, green, blue, alpha),其中alpha透明度可省略 159 | plt.plot([1,2,3],[4,5,6],color=(0.1, 0.2, 0.5)) 160 | plt.plot([4,5,6],[1,2,3],color=(0.1, 0.2, 0.5, 0.5)); 161 | ``` 162 | 163 | 164 | 165 | 166 | 167 | 168 | ### 2.HEX RGB 或 RGBA 169 | 170 | 171 | ```{code-cell} ipython3 172 | # 用十六进制颜色码表示,同样最后两位表示透明度,可省略 173 | plt.plot([1,2,3],[4,5,6],color='#0f0f0f') 174 | plt.plot([4,5,6],[1,2,3],color='#0f0f0f80'); 175 | ``` 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | RGB颜色和HEX颜色之间是可以一一对应的,以下网址提供了两种色彩表示方法的转换工具。 184 | [https://www.colorhexa.com/](https://www.colorhexa.com/) 185 | 186 | ### 3.灰度色阶 187 | 188 | 189 | ```{code-cell} ipython3 190 | # 当只有一个位于[0,1]的值时,表示灰度色阶 191 | plt.plot([1,2,3],[4,5,6],color='0.5'); 192 | ``` 193 | 194 | 195 | 196 | 197 | 198 | 199 | ### 4.单字符基本颜色 200 | 201 | 202 | ```{code-cell} ipython3 203 | # matplotlib有八个基本颜色,可以用单字符串来表示,分别是'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w',对应的是blue, green, red, cyan, magenta, yellow, black, and white的英文缩写 204 | plt.plot([1,2,3],[4,5,6],color='m'); 205 | ``` 206 | 207 | 208 | 209 | 210 | 211 | 212 | ### 5.颜色名称 213 | 214 | 215 | ```{code-cell} ipython3 216 | # matplotlib提供了颜色对照表,可供查询颜色对应的名称 217 | plt.plot([1,2,3],[4,5,6],color='tan'); 218 | ``` 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | ![](https://matplotlib.org/3.1.0/_images/sphx_glr_named_colors_002.png) 227 | ![](https://matplotlib.org/3.1.0/_images/sphx_glr_named_colors_003.png) 228 | 229 | ### 6.使用colormap设置一组颜色 230 | 231 | 有些图表支持使用colormap的方式配置一组颜色,从而在可视化中通过色彩的变化表达更多信息。 232 | 233 | 在matplotlib中,colormap共有五种类型: 234 | 235 | - 顺序(Sequential)。通常使用单一色调,逐渐改变亮度和颜色渐渐增加,用于表示有顺序的信息 236 | - 发散(Diverging)。改变两种不同颜色的亮度和饱和度,这些颜色在中间以不饱和的颜色相遇;当绘制的信息具有关键中间值(例如地形)或数据偏离零时,应使用此值。 237 | - 循环(Cyclic)。改变两种不同颜色的亮度,在中间和开始/结束时以不饱和的颜色相遇。用于在端点处环绕的值,例如相角,风向或一天中的时间。 238 | - 定性(Qualitative)。常是杂色,用来表示没有排序或关系的信息。 239 | - 杂色(Miscellaneous)。一些在特定场景使用的杂色组合,如彩虹,海洋,地形等。 240 | 241 | 242 | ```{code-cell} ipython3 243 | x = np.random.randn(50) 244 | y = np.random.randn(50) 245 | plt.scatter(x,y,c=x,cmap='RdPu'); 246 | ``` 247 | 248 | 249 | 在以下官网页面可以查询上述五种colormap的字符串表示和颜色图的对应关系 250 | [https://matplotlib.org/stable/tutorials/colors/colormaps.html](https://matplotlib.org/stable/tutorials/colors/colormaps.html) 251 | 252 | 253 | ## 思考题 254 | - 学习如何自定义colormap,并将其应用到任意一个数据集中,绘制一幅图像,注意colormap的类型要和数据集的特性相匹配,并做简单解释 255 | -------------------------------------------------------------------------------- /docs/_static/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/__init__.py -------------------------------------------------------------------------------- /docs/_static/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /docs/_static/css/theme.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /***************************************************************************** 3 | * Theme config 4 | **/ 5 | --pst-header-height: 60px; 6 | 7 | /***************************************************************************** 8 | * Font size 9 | **/ 10 | --pst-font-size-base: 15px; /* base font size - applied at body / html level */ 11 | 12 | /* heading font sizes */ 13 | --pst-font-size-h1: 36px; 14 | --pst-font-size-h2: 32px; 15 | --pst-font-size-h3: 26px; 16 | --pst-font-size-h4: 21px; 17 | --pst-font-size-h5: 18px; 18 | --pst-font-size-h6: 16px; 19 | 20 | /* smaller then heading font sizes*/ 21 | --pst-font-size-milli: 12px; 22 | 23 | --pst-sidebar-font-size: .9em; 24 | --pst-sidebar-caption-font-size: .9em; 25 | 26 | /***************************************************************************** 27 | * Font family 28 | **/ 29 | /* These are adapted from https://systemfontstack.com/ */ 30 | --pst-font-family-base-system: -apple-system, BlinkMacSystemFont, Segoe UI, "Helvetica Neue", 31 | Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; 32 | --pst-font-family-monospace-system: "SFMono-Regular", Menlo, Consolas, Monaco, 33 | Liberation Mono, Lucida Console, monospace; 34 | 35 | --pst-font-family-base: var(--pst-font-family-base-system); 36 | --pst-font-family-heading: var(--pst-font-family-base); 37 | --pst-font-family-monospace: var(--pst-font-family-monospace-system); 38 | 39 | /***************************************************************************** 40 | * Color 41 | * 42 | * Colors are defined in rgb string way, "red, green, blue" 43 | **/ 44 | --pst-color-primary: 19, 6, 84; 45 | --pst-color-success: 40, 167, 69; 46 | --pst-color-info: 0, 123, 255; /*23, 162, 184;*/ 47 | --pst-color-warning: 255, 193, 7; 48 | --pst-color-danger: 220, 53, 69; 49 | --pst-color-text-base: 51, 51, 51; 50 | 51 | --pst-color-h1: var(--pst-color-primary); 52 | --pst-color-h2: var(--pst-color-primary); 53 | --pst-color-h3: var(--pst-color-text-base); 54 | --pst-color-h4: var(--pst-color-text-base); 55 | --pst-color-h5: var(--pst-color-text-base); 56 | --pst-color-h6: var(--pst-color-text-base); 57 | --pst-color-paragraph: var(--pst-color-text-base); 58 | --pst-color-link: 0, 91, 129; 59 | --pst-color-link-hover: 227, 46, 0; 60 | --pst-color-headerlink: 198, 15, 15; 61 | --pst-color-headerlink-hover: 255, 255, 255; 62 | --pst-color-preformatted-text: 34, 34, 34; 63 | --pst-color-preformatted-background: 250, 250, 250; 64 | --pst-color-inline-code: 232, 62, 140; 65 | 66 | --pst-color-active-navigation: 19, 6, 84; 67 | --pst-color-navbar-link: 77, 77, 77; 68 | --pst-color-navbar-link-hover: var(--pst-color-active-navigation); 69 | --pst-color-navbar-link-active: var(--pst-color-active-navigation); 70 | --pst-color-sidebar-link: 77, 77, 77; 71 | --pst-color-sidebar-link-hover: var(--pst-color-active-navigation); 72 | --pst-color-sidebar-link-active: var(--pst-color-active-navigation); 73 | --pst-color-sidebar-expander-background-hover: 244, 244, 244; 74 | --pst-color-sidebar-caption: 77, 77, 77; 75 | --pst-color-toc-link: 119, 117, 122; 76 | --pst-color-toc-link-hover: var(--pst-color-active-navigation); 77 | --pst-color-toc-link-active: var(--pst-color-active-navigation); 78 | 79 | /***************************************************************************** 80 | * Icon 81 | **/ 82 | 83 | /* font awesome icons*/ 84 | --pst-icon-check-circle: '\f058'; 85 | --pst-icon-info-circle: '\f05a'; 86 | --pst-icon-exclamation-triangle: '\f071'; 87 | --pst-icon-exclamation-circle: '\f06a'; 88 | --pst-icon-times-circle: '\f057'; 89 | --pst-icon-lightbulb: '\f0eb'; 90 | 91 | /***************************************************************************** 92 | * Admonitions 93 | **/ 94 | 95 | --pst-color-admonition-default: var(--pst-color-info); 96 | --pst-color-admonition-note: var(--pst-color-info); 97 | --pst-color-admonition-attention: var(--pst-color-warning); 98 | --pst-color-admonition-caution: var(--pst-color-warning); 99 | --pst-color-admonition-warning: var(--pst-color-warning); 100 | --pst-color-admonition-danger: var(--pst-color-danger); 101 | --pst-color-admonition-error: var(--pst-color-danger); 102 | --pst-color-admonition-hint: var(--pst-color-success); 103 | --pst-color-admonition-tip: var(--pst-color-success); 104 | --pst-color-admonition-important: var(--pst-color-success); 105 | 106 | --pst-icon-admonition-default: var(--pst-icon-info-circle); 107 | --pst-icon-admonition-note: var(--pst-icon-info-circle); 108 | --pst-icon-admonition-attention: var(--pst-icon-exclamation-circle); 109 | --pst-icon-admonition-caution: var(--pst-icon-exclamation-triangle); 110 | --pst-icon-admonition-warning: var(--pst-icon-exclamation-triangle); 111 | --pst-icon-admonition-danger: var(--pst-icon-exclamation-triangle); 112 | --pst-icon-admonition-error: var(--pst-icon-times-circle); 113 | --pst-icon-admonition-hint: var(--pst-icon-lightbulb); 114 | --pst-icon-admonition-tip: var(--pst-icon-lightbulb); 115 | --pst-icon-admonition-important: var(--pst-icon-exclamation-circle); 116 | 117 | } 118 | -------------------------------------------------------------------------------- /docs/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | * 33 | * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL 34 | */ 35 | jQuery.urldecode = function(x) { 36 | if (!x) { 37 | return x 38 | } 39 | return decodeURIComponent(x.replace(/\+/g, ' ')); 40 | }; 41 | 42 | /** 43 | * small helper function to urlencode strings 44 | */ 45 | jQuery.urlencode = encodeURIComponent; 46 | 47 | /** 48 | * This function returns the parsed url parameters of the 49 | * current request. Multiple values per key are supported, 50 | * it will always return arrays of strings for the value parts. 51 | */ 52 | jQuery.getQueryParameters = function(s) { 53 | if (typeof s === 'undefined') 54 | s = document.location.search; 55 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 56 | var result = {}; 57 | for (var i = 0; i < parts.length; i++) { 58 | var tmp = parts[i].split('=', 2); 59 | var key = jQuery.urldecode(tmp[0]); 60 | var value = jQuery.urldecode(tmp[1]); 61 | if (key in result) 62 | result[key].push(value); 63 | else 64 | result[key] = [value]; 65 | } 66 | return result; 67 | }; 68 | 69 | /** 70 | * highlight a given string on a jquery object by wrapping it in 71 | * span elements with the given class name. 72 | */ 73 | jQuery.fn.highlightText = function(text, className) { 74 | function highlight(node, addItems) { 75 | if (node.nodeType === 3) { 76 | var val = node.nodeValue; 77 | var pos = val.toLowerCase().indexOf(text); 78 | if (pos >= 0 && 79 | !jQuery(node.parentNode).hasClass(className) && 80 | !jQuery(node.parentNode).hasClass("nohighlight")) { 81 | var span; 82 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 83 | if (isInSVG) { 84 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 85 | } else { 86 | span = document.createElement("span"); 87 | span.className = className; 88 | } 89 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 90 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 91 | document.createTextNode(val.substr(pos + text.length)), 92 | node.nextSibling)); 93 | node.nodeValue = val.substr(0, pos); 94 | if (isInSVG) { 95 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 96 | var bbox = node.parentElement.getBBox(); 97 | rect.x.baseVal.value = bbox.x; 98 | rect.y.baseVal.value = bbox.y; 99 | rect.width.baseVal.value = bbox.width; 100 | rect.height.baseVal.value = bbox.height; 101 | rect.setAttribute('class', className); 102 | addItems.push({ 103 | "parent": node.parentNode, 104 | "target": rect}); 105 | } 106 | } 107 | } 108 | else if (!jQuery(node).is("button, select, textarea")) { 109 | jQuery.each(node.childNodes, function() { 110 | highlight(this, addItems); 111 | }); 112 | } 113 | } 114 | var addItems = []; 115 | var result = this.each(function() { 116 | highlight(this, addItems); 117 | }); 118 | for (var i = 0; i < addItems.length; ++i) { 119 | jQuery(addItems[i].parent).before(addItems[i].target); 120 | } 121 | return result; 122 | }; 123 | 124 | /* 125 | * backward compatibility for jQuery.browser 126 | * This will be supported until firefox bug is fixed. 127 | */ 128 | if (!jQuery.browser) { 129 | jQuery.uaMatch = function(ua) { 130 | ua = ua.toLowerCase(); 131 | 132 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 133 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 134 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 135 | /(msie) ([\w.]+)/.exec(ua) || 136 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 137 | []; 138 | 139 | return { 140 | browser: match[ 1 ] || "", 141 | version: match[ 2 ] || "0" 142 | }; 143 | }; 144 | jQuery.browser = {}; 145 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 146 | } 147 | 148 | /** 149 | * Small JavaScript module for the documentation. 150 | */ 151 | var Documentation = { 152 | 153 | init : function() { 154 | this.fixFirefoxAnchorBug(); 155 | this.highlightSearchWords(); 156 | this.initIndexTable(); 157 | if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { 158 | this.initOnKeyListeners(); 159 | } 160 | }, 161 | 162 | /** 163 | * i18n support 164 | */ 165 | TRANSLATIONS : {}, 166 | PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, 167 | LOCALE : 'unknown', 168 | 169 | // gettext and ngettext don't access this so that the functions 170 | // can safely bound to a different name (_ = Documentation.gettext) 171 | gettext : function(string) { 172 | var translated = Documentation.TRANSLATIONS[string]; 173 | if (typeof translated === 'undefined') 174 | return string; 175 | return (typeof translated === 'string') ? translated : translated[0]; 176 | }, 177 | 178 | ngettext : function(singular, plural, n) { 179 | var translated = Documentation.TRANSLATIONS[singular]; 180 | if (typeof translated === 'undefined') 181 | return (n == 1) ? singular : plural; 182 | return translated[Documentation.PLURALEXPR(n)]; 183 | }, 184 | 185 | addTranslations : function(catalog) { 186 | for (var key in catalog.messages) 187 | this.TRANSLATIONS[key] = catalog.messages[key]; 188 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 189 | this.LOCALE = catalog.locale; 190 | }, 191 | 192 | /** 193 | * add context elements like header anchor links 194 | */ 195 | addContextElements : function() { 196 | $('div[id] > :header:first').each(function() { 197 | $('\u00B6'). 198 | attr('href', '#' + this.id). 199 | attr('title', _('Permalink to this headline')). 200 | appendTo(this); 201 | }); 202 | $('dt[id]').each(function() { 203 | $('\u00B6'). 204 | attr('href', '#' + this.id). 205 | attr('title', _('Permalink to this definition')). 206 | appendTo(this); 207 | }); 208 | }, 209 | 210 | /** 211 | * workaround a firefox stupidity 212 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 213 | */ 214 | fixFirefoxAnchorBug : function() { 215 | if (document.location.hash && $.browser.mozilla) 216 | window.setTimeout(function() { 217 | document.location.href += ''; 218 | }, 10); 219 | }, 220 | 221 | /** 222 | * highlight the search words provided in the url in the text 223 | */ 224 | highlightSearchWords : function() { 225 | var params = $.getQueryParameters(); 226 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 227 | if (terms.length) { 228 | var body = $('div.body'); 229 | if (!body.length) { 230 | body = $('body'); 231 | } 232 | window.setTimeout(function() { 233 | $.each(terms, function() { 234 | body.highlightText(this.toLowerCase(), 'highlighted'); 235 | }); 236 | }, 10); 237 | $('') 239 | .appendTo($('#searchbox')); 240 | } 241 | }, 242 | 243 | /** 244 | * init the domain index toggle buttons 245 | */ 246 | initIndexTable : function() { 247 | var togglers = $('img.toggler').click(function() { 248 | var src = $(this).attr('src'); 249 | var idnum = $(this).attr('id').substr(7); 250 | $('tr.cg-' + idnum).toggle(); 251 | if (src.substr(-9) === 'minus.png') 252 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 253 | else 254 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 255 | }).css('display', ''); 256 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 257 | togglers.click(); 258 | } 259 | }, 260 | 261 | /** 262 | * helper function to hide the search marks again 263 | */ 264 | hideSearchWords : function() { 265 | $('#searchbox .highlight-link').fadeOut(300); 266 | $('span.highlighted').removeClass('highlighted'); 267 | }, 268 | 269 | /** 270 | * make the url absolute 271 | */ 272 | makeURL : function(relativeURL) { 273 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 274 | }, 275 | 276 | /** 277 | * get the current relative url 278 | */ 279 | getCurrentURL : function() { 280 | var path = document.location.pathname; 281 | var parts = path.split(/\//); 282 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 283 | if (this === '..') 284 | parts.pop(); 285 | }); 286 | var url = parts.join('/'); 287 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 288 | }, 289 | 290 | initOnKeyListeners: function() { 291 | $(document).keydown(function(event) { 292 | var activeElementType = document.activeElement.tagName; 293 | // don't navigate when in search box, textarea, dropdown or button 294 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' 295 | && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey 296 | && !event.shiftKey) { 297 | switch (event.keyCode) { 298 | case 37: // left 299 | var prevHref = $('link[rel="prev"]').prop('href'); 300 | if (prevHref) { 301 | window.location.href = prevHref; 302 | return false; 303 | } 304 | case 39: // right 305 | var nextHref = $('link[rel="next"]').prop('href'); 306 | if (nextHref) { 307 | window.location.href = nextHref; 308 | return false; 309 | } 310 | } 311 | } 312 | }); 313 | } 314 | }; 315 | 316 | // quick alias for translations 317 | _ = Documentation.gettext; 318 | 319 | $(document).ready(function() { 320 | Documentation.init(); 321 | }); 322 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '1', 4 | LANGUAGE: 'zh', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: true 12 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/images/logo_binder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | logo 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/_static/images/logo_colab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/images/logo_colab.png -------------------------------------------------------------------------------- /docs/_static/images/logo_jupyterhub.svg: -------------------------------------------------------------------------------- 1 | logo_jupyterhubHub 2 | -------------------------------------------------------------------------------- /docs/_static/language_data.js: -------------------------------------------------------------------------------- 1 | /* 2 | * language_data.js 3 | * ~~~~~~~~~~~~~~~~ 4 | * 5 | * This script contains the language-specific data used by searchtools.js, 6 | * namely the list of stopwords, stemmer, scorer and splitter. 7 | * 8 | * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. 9 | * :license: BSD, see LICENSE for details. 10 | * 11 | */ 12 | 13 | var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"]; 14 | 15 | 16 | /* Non-minified version is copied as a separate JS file, is available */ 17 | 18 | /** 19 | * Porter Stemmer 20 | */ 21 | var Stemmer = function() { 22 | 23 | var step2list = { 24 | ational: 'ate', 25 | tional: 'tion', 26 | enci: 'ence', 27 | anci: 'ance', 28 | izer: 'ize', 29 | bli: 'ble', 30 | alli: 'al', 31 | entli: 'ent', 32 | eli: 'e', 33 | ousli: 'ous', 34 | ization: 'ize', 35 | ation: 'ate', 36 | ator: 'ate', 37 | alism: 'al', 38 | iveness: 'ive', 39 | fulness: 'ful', 40 | ousness: 'ous', 41 | aliti: 'al', 42 | iviti: 'ive', 43 | biliti: 'ble', 44 | logi: 'log' 45 | }; 46 | 47 | var step3list = { 48 | icate: 'ic', 49 | ative: '', 50 | alize: 'al', 51 | iciti: 'ic', 52 | ical: 'ic', 53 | ful: '', 54 | ness: '' 55 | }; 56 | 57 | var c = "[^aeiou]"; // consonant 58 | var v = "[aeiouy]"; // vowel 59 | var C = c + "[^aeiouy]*"; // consonant sequence 60 | var V = v + "[aeiou]*"; // vowel sequence 61 | 62 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 63 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 64 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 65 | var s_v = "^(" + C + ")?" + v; // vowel in stem 66 | 67 | this.stemWord = function (w) { 68 | var stem; 69 | var suffix; 70 | var firstch; 71 | var origword = w; 72 | 73 | if (w.length < 3) 74 | return w; 75 | 76 | var re; 77 | var re2; 78 | var re3; 79 | var re4; 80 | 81 | firstch = w.substr(0,1); 82 | if (firstch == "y") 83 | w = firstch.toUpperCase() + w.substr(1); 84 | 85 | // Step 1a 86 | re = /^(.+?)(ss|i)es$/; 87 | re2 = /^(.+?)([^s])s$/; 88 | 89 | if (re.test(w)) 90 | w = w.replace(re,"$1$2"); 91 | else if (re2.test(w)) 92 | w = w.replace(re2,"$1$2"); 93 | 94 | // Step 1b 95 | re = /^(.+?)eed$/; 96 | re2 = /^(.+?)(ed|ing)$/; 97 | if (re.test(w)) { 98 | var fp = re.exec(w); 99 | re = new RegExp(mgr0); 100 | if (re.test(fp[1])) { 101 | re = /.$/; 102 | w = w.replace(re,""); 103 | } 104 | } 105 | else if (re2.test(w)) { 106 | var fp = re2.exec(w); 107 | stem = fp[1]; 108 | re2 = new RegExp(s_v); 109 | if (re2.test(stem)) { 110 | w = stem; 111 | re2 = /(at|bl|iz)$/; 112 | re3 = new RegExp("([^aeiouylsz])\\1$"); 113 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 114 | if (re2.test(w)) 115 | w = w + "e"; 116 | else if (re3.test(w)) { 117 | re = /.$/; 118 | w = w.replace(re,""); 119 | } 120 | else if (re4.test(w)) 121 | w = w + "e"; 122 | } 123 | } 124 | 125 | // Step 1c 126 | re = /^(.+?)y$/; 127 | if (re.test(w)) { 128 | var fp = re.exec(w); 129 | stem = fp[1]; 130 | re = new RegExp(s_v); 131 | if (re.test(stem)) 132 | w = stem + "i"; 133 | } 134 | 135 | // Step 2 136 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 137 | if (re.test(w)) { 138 | var fp = re.exec(w); 139 | stem = fp[1]; 140 | suffix = fp[2]; 141 | re = new RegExp(mgr0); 142 | if (re.test(stem)) 143 | w = stem + step2list[suffix]; 144 | } 145 | 146 | // Step 3 147 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 148 | if (re.test(w)) { 149 | var fp = re.exec(w); 150 | stem = fp[1]; 151 | suffix = fp[2]; 152 | re = new RegExp(mgr0); 153 | if (re.test(stem)) 154 | w = stem + step3list[suffix]; 155 | } 156 | 157 | // Step 4 158 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 159 | re2 = /^(.+?)(s|t)(ion)$/; 160 | if (re.test(w)) { 161 | var fp = re.exec(w); 162 | stem = fp[1]; 163 | re = new RegExp(mgr1); 164 | if (re.test(stem)) 165 | w = stem; 166 | } 167 | else if (re2.test(w)) { 168 | var fp = re2.exec(w); 169 | stem = fp[1] + fp[2]; 170 | re2 = new RegExp(mgr1); 171 | if (re2.test(stem)) 172 | w = stem; 173 | } 174 | 175 | // Step 5 176 | re = /^(.+?)e$/; 177 | if (re.test(w)) { 178 | var fp = re.exec(w); 179 | stem = fp[1]; 180 | re = new RegExp(mgr1); 181 | re2 = new RegExp(meq1); 182 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 183 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 184 | w = stem; 185 | } 186 | re = /ll$/; 187 | re2 = new RegExp(mgr1); 188 | if (re.test(w) && re2.test(w)) { 189 | re = /.$/; 190 | w = w.replace(re,""); 191 | } 192 | 193 | // and turn initial Y back to y 194 | if (firstch == "y") 195 | w = firstch.toLowerCase() + w.substr(1); 196 | return w; 197 | } 198 | } 199 | 200 | 201 | 202 | 203 | var splitChars = (function() { 204 | var result = {}; 205 | var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, 206 | 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, 207 | 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, 208 | 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, 209 | 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, 210 | 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 211 | 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, 212 | 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, 213 | 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, 214 | 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; 215 | var i, j, start, end; 216 | for (i = 0; i < singles.length; i++) { 217 | result[singles[i]] = true; 218 | } 219 | var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], 220 | [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], 221 | [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], 222 | [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], 223 | [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], 224 | [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], 225 | [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], 226 | [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], 227 | [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], 228 | [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], 229 | [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], 230 | [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], 231 | [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], 232 | [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], 233 | [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], 234 | [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], 235 | [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], 236 | [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], 237 | [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], 238 | [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], 239 | [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], 240 | [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], 241 | [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], 242 | [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], 243 | [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], 244 | [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], 245 | [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], 246 | [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], 247 | [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], 248 | [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], 249 | [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], 250 | [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], 251 | [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], 252 | [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], 253 | [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], 254 | [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], 255 | [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], 256 | [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], 257 | [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], 258 | [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], 259 | [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], 260 | [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], 261 | [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], 262 | [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], 263 | [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], 264 | [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], 265 | [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], 266 | [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], 267 | [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; 268 | for (i = 0; i < ranges.length; i++) { 269 | start = ranges[i][0]; 270 | end = ranges[i][1]; 271 | for (j = start; j <= end; j++) { 272 | result[j] = true; 273 | } 274 | } 275 | return result; 276 | })(); 277 | 278 | function splitQuery(query) { 279 | var result = []; 280 | var start = -1; 281 | for (var i = 0; i < query.length; i++) { 282 | if (splitChars[query.charCodeAt(i)]) { 283 | if (start !== -1) { 284 | result.push(query.slice(start, i)); 285 | start = -1; 286 | } 287 | } else if (start === -1) { 288 | start = i; 289 | } 290 | } 291 | if (start !== -1) { 292 | result.push(query.slice(start)); 293 | } 294 | return result; 295 | } 296 | 297 | 298 | -------------------------------------------------------------------------------- /docs/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/logo.png -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/mystnb.css: -------------------------------------------------------------------------------- 1 | /* Whole cell */ 2 | div.container.cell { 3 | padding-left: 0; 4 | margin-bottom: 1em; 5 | } 6 | 7 | /* Removing all background formatting so we can control at the div level */ 8 | .cell_input div.highlight, .cell_input pre, .cell_output .output * { 9 | border: none; 10 | box-shadow: none; 11 | } 12 | 13 | .cell_output .output pre, .cell_input pre { 14 | margin: 0px; 15 | } 16 | 17 | /* Input cells */ 18 | div.cell div.cell_input { 19 | padding-left: 0em; 20 | padding-right: 0em; 21 | border: 1px #ccc solid; 22 | background-color: #f7f7f7; 23 | border-left-color: green; 24 | border-left-width: medium; 25 | } 26 | 27 | div.cell_input > div, div.cell_output div.output > div.highlight { 28 | margin: 0em !important; 29 | border: none !important; 30 | } 31 | 32 | /* All cell outputs */ 33 | .cell_output { 34 | padding-left: 1em; 35 | padding-right: 0em; 36 | margin-top: 1em; 37 | } 38 | 39 | /* Outputs from jupyter_sphinx overrides to remove extra CSS */ 40 | div.section div.jupyter_container { 41 | padding: .4em; 42 | margin: 0 0 .4em 0; 43 | background-color: none; 44 | border: none; 45 | -moz-box-shadow: none; 46 | -webkit-box-shadow: none; 47 | box-shadow: none; 48 | } 49 | 50 | /* Text outputs from cells */ 51 | .cell_output .output.text_plain, 52 | .cell_output .output.traceback, 53 | .cell_output .output.stream, 54 | .cell_output .output.stderr 55 | { 56 | background: #fcfcfc; 57 | margin-top: 1em; 58 | margin-bottom: 0em; 59 | box-shadow: none; 60 | } 61 | 62 | .cell_output .output.text_plain, 63 | .cell_output .output.stream, 64 | .cell_output .output.stderr { 65 | border: 1px solid #f7f7f7; 66 | } 67 | 68 | .cell_output .output.stderr { 69 | background: #fdd; 70 | } 71 | 72 | .cell_output .output.traceback { 73 | border: 1px solid #ffd6d6; 74 | } 75 | 76 | /* Math align to the left */ 77 | .cell_output .MathJax_Display { 78 | text-align: left !important; 79 | } 80 | 81 | /* Pandas tables. Pulled from the Jupyter / nbsphinx CSS */ 82 | div.cell_output table { 83 | border: none; 84 | border-collapse: collapse; 85 | border-spacing: 0; 86 | color: black; 87 | font-size: 1em; 88 | table-layout: fixed; 89 | } 90 | div.cell_output thead { 91 | border-bottom: 1px solid black; 92 | vertical-align: bottom; 93 | } 94 | div.cell_output tr, 95 | div.cell_output th, 96 | div.cell_output td { 97 | text-align: right; 98 | vertical-align: middle; 99 | padding: 0.5em 0.5em; 100 | line-height: normal; 101 | white-space: normal; 102 | max-width: none; 103 | border: none; 104 | } 105 | div.cell_output th { 106 | font-weight: bold; 107 | } 108 | div.cell_output tbody tr:nth-child(odd) { 109 | background: #f5f5f5; 110 | } 111 | div.cell_output tbody tr:hover { 112 | background: rgba(66, 165, 245, 0.2); 113 | } 114 | 115 | 116 | /* Inline text from `paste` operation */ 117 | 118 | span.pasted-text { 119 | font-weight: bold; 120 | } 121 | 122 | span.pasted-inline img { 123 | max-height: 2em; 124 | } 125 | 126 | tbody span.pasted-inline img { 127 | max-height: none; 128 | } 129 | 130 | /* Font colors for translated ANSI escape sequences 131 | Color values are adapted from share/jupyter/nbconvert/templates/classic/static/style.css 132 | */ 133 | div.highlight .-Color-Bold { 134 | font-weight: bold; 135 | } 136 | div.highlight .-Color[class*=-Black] { 137 | color :#3E424D 138 | } 139 | div.highlight .-Color[class*=-Red] { 140 | color: #E75C58 141 | } 142 | div.highlight .-Color[class*=-Green] { 143 | color: #00A250 144 | } 145 | div.highlight .-Color[class*=-Yellow] { 146 | color: yellow 147 | } 148 | div.highlight .-Color[class*=-Blue] { 149 | color: #208FFB 150 | } 151 | div.highlight .-Color[class*=-Magenta] { 152 | color: #D160C4 153 | } 154 | div.highlight .-Color[class*=-Cyan] { 155 | color: #60C6C8 156 | } 157 | div.highlight .-Color[class*=-White] { 158 | color: #C5C1B4 159 | } 160 | div.highlight .-Color[class*=-BGBlack] { 161 | background-color: #3E424D 162 | } 163 | div.highlight .-Color[class*=-BGRed] { 164 | background-color: #E75C58 165 | } 166 | div.highlight .-Color[class*=-BGGreen] { 167 | background-color: #00A250 168 | } 169 | div.highlight .-Color[class*=-BGYellow] { 170 | background-color: yellow 171 | } 172 | div.highlight .-Color[class*=-BGBlue] { 173 | background-color: #208FFB 174 | } 175 | div.highlight .-Color[class*=-BGMagenta] { 176 | background-color: #D160C4 177 | } 178 | div.highlight .-Color[class*=-BGCyan] { 179 | background-color: #60C6C8 180 | } 181 | div.highlight .-Color[class*=-BGWhite] { 182 | background-color: #C5C1B4 183 | } 184 | -------------------------------------------------------------------------------- /docs/_static/plot_directive.css: -------------------------------------------------------------------------------- 1 | /* 2 | * plot_directive.css 3 | * ~~~~~~~~~~~~ 4 | * 5 | * Stylesheet controlling images created using the `plot` directive within 6 | * Sphinx. 7 | * 8 | * :copyright: Copyright 2020-* by the Matplotlib development team. 9 | * :license: Matplotlib, see LICENSE for details. 10 | * 11 | */ 12 | 13 | img.plot-directive { 14 | border: 0; 15 | max-width: 100%; 16 | } 17 | -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; } 2 | td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight { background: #f8f8f8; } 8 | .highlight .c { color: #8f5902; font-style: italic } /* Comment */ 9 | .highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ 10 | .highlight .g { color: #000000 } /* Generic */ 11 | .highlight .k { color: #204a87; font-weight: bold } /* Keyword */ 12 | .highlight .l { color: #000000 } /* Literal */ 13 | .highlight .n { color: #000000 } /* Name */ 14 | .highlight .o { color: #ce5c00; font-weight: bold } /* Operator */ 15 | .highlight .x { color: #000000 } /* Other */ 16 | .highlight .p { color: #000000; font-weight: bold } /* Punctuation */ 17 | .highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ 18 | .highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ 19 | .highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ 20 | .highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ 21 | .highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ 22 | .highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ 23 | .highlight .gd { color: #a40000 } /* Generic.Deleted */ 24 | .highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ 25 | .highlight .gr { color: #ef2929 } /* Generic.Error */ 26 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 27 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 28 | .highlight .go { color: #000000; font-style: italic } /* Generic.Output */ 29 | .highlight .gp { color: #8f5902 } /* Generic.Prompt */ 30 | .highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ 31 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 32 | .highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ 33 | .highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ 34 | .highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ 35 | .highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ 36 | .highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ 37 | .highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ 38 | .highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ 39 | .highlight .ld { color: #000000 } /* Literal.Date */ 40 | .highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */ 41 | .highlight .s { color: #4e9a06 } /* Literal.String */ 42 | .highlight .na { color: #c4a000 } /* Name.Attribute */ 43 | .highlight .nb { color: #204a87 } /* Name.Builtin */ 44 | .highlight .nc { color: #000000 } /* Name.Class */ 45 | .highlight .no { color: #000000 } /* Name.Constant */ 46 | .highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ 47 | .highlight .ni { color: #ce5c00 } /* Name.Entity */ 48 | .highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ 49 | .highlight .nf { color: #000000 } /* Name.Function */ 50 | .highlight .nl { color: #f57900 } /* Name.Label */ 51 | .highlight .nn { color: #000000 } /* Name.Namespace */ 52 | .highlight .nx { color: #000000 } /* Name.Other */ 53 | .highlight .py { color: #000000 } /* Name.Property */ 54 | .highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ 55 | .highlight .nv { color: #000000 } /* Name.Variable */ 56 | .highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ 57 | .highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ 58 | .highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ 59 | .highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ 60 | .highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ 61 | .highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ 62 | .highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ 63 | .highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ 64 | .highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ 65 | .highlight .sc { color: #4e9a06 } /* Literal.String.Char */ 66 | .highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ 67 | .highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ 68 | .highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ 69 | .highlight .se { color: #4e9a06 } /* Literal.String.Escape */ 70 | .highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ 71 | .highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ 72 | .highlight .sx { color: #4e9a06 } /* Literal.String.Other */ 73 | .highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ 74 | .highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ 75 | .highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ 76 | .highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ 77 | .highlight .fm { color: #000000 } /* Name.Function.Magic */ 78 | .highlight .vc { color: #000000 } /* Name.Variable.Class */ 79 | .highlight .vg { color: #000000 } /* Name.Variable.Global */ 80 | .highlight .vi { color: #000000 } /* Name.Variable.Instance */ 81 | .highlight .vm { color: #000000 } /* Name.Variable.Magic */ 82 | .highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_static/sphinx-book-theme.12a9622fbb08dcb3a2a40b2c02b83a57.js: -------------------------------------------------------------------------------- 1 | var initTriggerNavBar=()=>{if($(window).width()<768){$("#navbar-toggler").trigger("click")}} 2 | var scrollToActive=()=>{var navbar=document.getElementById('site-navigation') 3 | var active_pages=navbar.querySelectorAll(".active") 4 | var active_page=active_pages[active_pages.length-1] 5 | if(active_page!==undefined&&active_page.offsetTop>($(window).height()*.5)){navbar.scrollTop=active_page.offsetTop-($(window).height()*.2)}} 6 | var sbRunWhenDOMLoaded=cb=>{if(document.readyState!='loading'){cb()}else if(document.addEventListener){document.addEventListener('DOMContentLoaded',cb)}else{document.attachEvent('onreadystatechange',function(){if(document.readyState=='complete')cb()})}} 7 | function toggleFullScreen(){var navToggler=$("#navbar-toggler");if(!document.fullscreenElement){document.documentElement.requestFullscreen();if(!navToggler.hasClass("collapsed")){navToggler.click();}}else{if(document.exitFullscreen){document.exitFullscreen();if(navToggler.hasClass("collapsed")){navToggler.click();}}}} 8 | var initTooltips=()=>{$(document).ready(function(){$('[data-toggle="tooltip"]').tooltip();});} 9 | var initTocHide=()=>{var scrollTimeout;var throttle=200;var tocHeight=$("#bd-toc-nav").outerHeight(true)+$(".bd-toc").outerHeight(true);var hideTocAfter=tocHeight+200;var checkTocScroll=function(){var margin_content=$(".margin, .tag_margin, .full-width, .full_width, .tag_full-width, .tag_full_width, .sidebar, .tag_sidebar, .popout, .tag_popout");margin_content.each((index,item)=>{var topOffset=$(item).offset().top-$(window).scrollTop();var bottomOffset=topOffset+$(item).outerHeight(true);var topOverlaps=((topOffset>=0)&&(topOffset=0)&&(bottomOffset20){$("div.bd-toc").removeClass("show") 10 | return false}else{$("div.bd-toc").addClass("show")};})};var manageScrolledClassOnBody=function(){if(window.scrollY>0){document.body.classList.add("scrolled");}else{document.body.classList.remove("scrolled");}} 11 | $(window).on('scroll',function(){if(!scrollTimeout){scrollTimeout=setTimeout(function(){checkTocScroll();manageScrolledClassOnBody();scrollTimeout=null;},throttle);}});} 12 | var initThebeSBT=()=>{var title=$("div.section h1")[0] 13 | if(!$(title).next().hasClass("thebe-launch-button")){$("").insertAfter($(title))} 14 | initThebe();} 15 | sbRunWhenDOMLoaded(initTooltips) 16 | sbRunWhenDOMLoaded(initTriggerNavBar) 17 | sbRunWhenDOMLoaded(scrollToActive) 18 | sbRunWhenDOMLoaded(initTocHide) 19 | -------------------------------------------------------------------------------- /docs/_static/sphinx-book-theme.css: -------------------------------------------------------------------------------- 1 | body{padding-top:0px !important}body img{max-width:100%}code{font-size:87.5% !important}main.bd-content{padding-top:3em !important;padding-bottom:0px !important}main.bd-content #main-content a.headerlink{opacity:0;margin-left:.2em}main.bd-content #main-content a.headerlink:hover{background-color:transparent;color:#0071bc;opacity:1 !important}main.bd-content #main-content a,main.bd-content #main-content a:visited{color:#0071bc}main.bd-content #main-content h1,main.bd-content #main-content h2,main.bd-content #main-content h3,main.bd-content #main-content h4,main.bd-content #main-content h5{color:black}main.bd-content #main-content h1:hover a.headerlink,main.bd-content #main-content h2:hover a.headerlink,main.bd-content #main-content h3:hover a.headerlink,main.bd-content #main-content h4:hover a.headerlink,main.bd-content #main-content h5:hover a.headerlink{opacity:.5}main.bd-content #main-content h1 a.toc-backref,main.bd-content #main-content h2 a.toc-backref,main.bd-content #main-content h3 a.toc-backref,main.bd-content #main-content h4 a.toc-backref,main.bd-content #main-content h5 a.toc-backref{color:inherit}main.bd-content #main-content div.section{padding-right:1em;overflow:visible !important}main.bd-content #main-content div.section ul p,main.bd-content #main-content div.section ol p{margin-bottom:0}main.bd-content #main-content span.eqno{float:right;font-size:1.2em}main.bd-content #main-content div.figure{width:100%;margin-bottom:1em;text-align:center}main.bd-content #main-content div.figure.align-left{text-align:left}main.bd-content #main-content div.figure.align-left p.caption{margin-left:0}main.bd-content #main-content div.figure.align-right{text-align:right}main.bd-content #main-content div.figure.align-right p.caption{margin-right:0}main.bd-content #main-content div.figure p.caption{margin:.5em 10%}main.bd-content #main-content div.figure.margin p.caption,main.bd-content #main-content div.figure.margin-caption p.caption{margin:.5em 0}main.bd-content #main-content div.figure.margin-caption p.caption{text-align:left}main.bd-content #main-content div.figure span.caption-number{font-weight:bold}main.bd-content #main-content div.figure span{font-size:.9rem}main.bd-content #main-content dl.glossary dd{margin-left:1.5em}main.bd-content #main-content div.contents{padding:1em}main.bd-content #main-content div.contents p.topic-title{font-size:1.5em;padding:.5em 0 0 1em}main.bd-content #main-content p.centered{text-align:center}main.bd-content #main-content div.sphinx-tabs>div.sphinx-menu{padding:0}main.bd-content #main-content div.sphinx-tabs>div.sphinx-menu>a.item{width:auto;margin:0px 0px -1px 0px}main.bd-content #main-content span.brackets:before,main.bd-content #main-content a.brackets:before{content:"["}main.bd-content #main-content span.brackets:after,main.bd-content #main-content a.brackets:after{content:"]"}main.bd-content #main-content .footnote-reference,main.bd-content #main-content a.bibtex.internal{font-size:1em}main.bd-content #main-content dl.footnote span.fn-backref{font-size:1em;padding-left:.1em}main.bd-content #main-content dl.footnote dd{font-size:.9em;margin-left:3em}main.bd-content #main-content dl.citation{margin-left:3em}main.bd-content #main-content dl.footnote dt.label{float:left}main.bd-content #main-content dl.footnote dd p{padding-left:1.5em}div.cell div.cell_output{padding-right:0}div.cell.tag_output_scroll div.cell_output{max-height:24em;overflow-y:auto}.toggle.admonition button.toggle-button{top:0.5em !important}button.toggle-button-hidden:before{bottom:0.2em !important}div.sidebar,div.margin,div.margin-caption p.caption,.cell.tag_popout,.cell.tag_margin{width:40%;float:right;border-left:1px #a4a6a7 solid;margin-left:0.5em;padding:.2em 0 .2em 1em}div.sidebar p,div.margin p,div.margin-caption p.caption p,.cell.tag_popout p,.cell.tag_margin p{margin-bottom:0}div.sidebar p.sidebar-title,div.margin p.sidebar-title,div.margin-caption p.caption p.sidebar-title,.cell.tag_popout p.sidebar-title,.cell.tag_margin p.sidebar-title{font-weight:bold;font-size:1.2em}@media (min-width: 768px){div.cell.tag_popout,div.cell.tag_margin,div.margin,div.margin-caption p.caption{border:none;clear:right;width:31% !important;margin:0 -35% 0 0 !important;padding:0 !important;font-size:0.9rem;line-height:1.3;vertical-align:baseline;position:relative}div.cell.tag_popout p,div.cell.tag_margin p,div.margin p,div.margin-caption p.caption p{margin-bottom:.5em}div.cell.tag_popout p.sidebar-title,div.cell.tag_margin p.sidebar-title,div.margin p.sidebar-title,div.margin-caption p.caption p.sidebar-title{font-size:1em}div.cell.tag_margin .cell_output{padding-left:0}div.sidebar:not(.margin){width:60%;margin-left:1.5em;margin-right:-28%}}@media (min-width: 768px){div.cell.tag_full-width,div.cell.tag_full_width,div.full_width,div.full-width{width:136% !important}}blockquote{margin:1em;padding:.2em 1.5em;border-left:4px solid #ccc}blockquote.pull-quote,blockquote.epigraph,blockquote.highlights{font-size:1.25em;border-left:none}blockquote div>p{margin-bottom:.5em}blockquote div>p+p.attribution{font-style:normal;font-size:.9em;text-align:right;color:#6c757d;padding-right:2em}div.highlight{background:none}.thebelab-cell{border:none !important}button.thebe-launch-button{height:2.5em;font-size:1em}div.tableofcontents-wrapper p.caption{font-weight:600 !important;margin-bottom:0em !important}.topbar{margin:0em auto 1em auto !important;padding-top:.25em;padding-bottom:.25em;background-color:white;height:3em;transition:left .2s}.topbar>div{height:2.5em;top:0px}.topbar .topbar-main>button,.topbar .topbar-main>div,.topbar .topbar-main>a{float:left;height:100%}.topbar .topbar-main button.topbarbtn{margin:0 .1em;background-color:white;color:#5a5a5a;border:none;padding-top:.1rem;padding-bottom:.1rem;font-size:1.4em}.topbar .topbar-main button.topbarbtn i.fab{vertical-align:baseline;line-height:1}.topbar .topbar-main div.dropdown-buttons-trigger,.topbar .topbar-main a.edit-button,.topbar .topbar-main a.full-screen-button{float:right}.bd-topbar-whitespace{padding-right:none}@media (max-width: 768px){.bd-topbar-whitespace{display:none}}span.topbar-button-text{margin-left:0.4em}@media (max-width: 768px){span.topbar-button-text{display:none}}div.dropdown-buttons-trigger div.dropdown-buttons{display:none;position:absolute;max-width:130px;margin-top:.2em;z-index:1000}div.dropdown-buttons-trigger div.dropdown-buttons.sourcebuttons .topbarbtn i{padding-right:6px;margin-left:-5px;font-size:.9em !important}div.dropdown-buttons-trigger div.dropdown-buttons button.topbarbtn{padding-top:.35rem;padding-bottom:.35rem;min-width:120px !important;border:1px white solid !important;background-color:#5a5a5a;color:white;font-size:1em}div.dropdown-buttons-trigger:hover div.dropdown-buttons{display:block}a.dropdown-buttons i{margin-right:.5em}button.topbarbtn img{height:1.15em;padding-right:6px;margin-left:-5px}#navbar-toggler{position:relative;margin-right:1em;margin-left:.5em;color:#5a5a5a}#navbar-toggler i{transition:opacity .3s, transform .3s;position:absolute;top:16%;left:0;display:block;font-size:1.2em}#navbar-toggler i.fa-bars{opacity:0;transform:rotate(180deg) scale(0.5)}#navbar-toggler i.fa-arrow-left,#navbar-toggler i.fa-arrow-up{opacity:1}#navbar-toggler.collapsed i.fa-bars{opacity:1;transform:rotate(0) scale(1)}#navbar-toggler.collapsed i.fa-arrow-left,#navbar-toggler.collapsed i.fa-arrow-up{opacity:0;transform:rotate(-180deg) scale(0.5)}@media (max-width: 768px){#navbar-toggler i.fa-arrow-up{display:inherit}#navbar-toggler i.fa-arrow-left{display:none}}@media (min-width: 768px){#navbar-toggler i.fa-arrow-up{display:none}#navbar-toggler i.fa-arrow-left{display:inherit}}.bd-toc{padding:0px !important;overflow-y:visible;background:white;right:0;z-index:999;transition:height .35s ease}.bd-toc div.onthispage,.bd-toc .toc-entry a{color:#5a5a5a}.bd-toc nav{opacity:0;max-height:0;transition:opacity 0.2s ease, max-height .7s ease;overflow-y:hidden;background:white}.bd-toc nav a:hover,.bd-toc nav li.active>a.active{color:#0071bc}.bd-toc nav li.active>a.active{border-left:2px solid #0071bc}.bd-toc:hover nav,.bd-toc.show nav{max-height:100vh;opacity:1}.bd-toc:hover .tocsection:after,.bd-toc.show .tocsection:after{opacity:0}.bd-toc .tocsection{padding:.5rem 0 .5rem 1rem !important}.bd-toc .tocsection:after{content:"\f107";font-family:"Font Awesome 5 Free";font-weight:900;padding-left:.5em;transition:opacity .3s ease}.bd-toc .toc-entry a{padding:.125rem 1rem !important}.bd-toc div.editthispage{display:none}.bd-sidebar{top:0px !important;overflow-y:auto;height:100vh !important;scrollbar-width:thin}.bd-sidebar nav ul.nav li a,.bd-sidebar nav ul.nav ul li a{color:#5a5a5a}.bd-sidebar nav ul.nav a:hover,.bd-sidebar nav ul.nav li.active>a,.bd-sidebar nav ul.nav li.active>a:hover{color:#0071bc}.bd-sidebar::-webkit-scrollbar{width:5px}.bd-sidebar::-webkit-scrollbar{background:#f1f1f1}.bd-sidebar::-webkit-scrollbar-thumb{background:#c1c1c1}@media (min-width: 992px){.bd-sidebar:not(:hover){-ms-overflow-style:none}.bd-sidebar:not(:hover)::-webkit-scrollbar{background:#FFFFFF}.bd-sidebar:not(:hover)::-webkit-scrollbar-thumb{background:#FFFFFF}}.bd-sidebar h1.site-logo{margin:.5em 0 0 0;font-size:1.1em;color:black;text-align:center}.bd-sidebar div.navbar_extra_footer{text-align:center;font-size:.9em;color:#5a5a5a;margin-bottom:3em}.bd-sidebar.collapsing{border:none;overflow:hidden;position:relative;padding-top:0}.bd-sidebar p.caption{margin-top:1.25em;margin-bottom:0;font-size:1.2em}.bd-sidebar li>a>i{font-size:.8em;margin-left:0.3em}.toc-h1,.toc-h2,.toc-h3,.toc-h4{font-size:1em}.toc-h1>a,.toc-h2>a,.toc-h3>a,.toc-h4>a{font-size:0.9em}.site-navigation,.site-navigation.collapsing{transition:flex .2s ease 0s, height .35s ease, opacity 0.2s ease}@media (max-width: 768px){#site-navigation{position:fixed;margin-top:3em;z-index:2000;background:white}}@media (max-width: 768px){.bd-sidebar{height:60vh !important;border-bottom:3px solid #c3c3c3}.bd-sidebar.collapsing{height:0px !important}.bd-sidebar.single-page{display:none}}@media (min-width: 768px){.bd-sidebar{z-index:2000 !important}.site-navigation.collapsing{flex:0 0 0px;padding:0}}@media (min-width: 768px){div.navbar-brand-box{padding-top:2em}}div.navbar-brand-box a.navbar-brand{width:100%;height:auto}div.navbar-brand-box a.navbar-brand img{display:block;height:auto;width:auto;max-height:10vh;max-width:100%;margin:0 auto}@media (min-width: 768px){div.navbar-brand-box a.navbar-brand img{max-height:15vh !important}}nav.bd-links{margin-left:0px;max-height:none !important}nav.bd-links p.caption{font-size:0.9em;text-transform:uppercase;font-weight:bold}nav.bd-links p.caption:first-child{margin-top:0}nav.bd-links ul{list-style:none}nav.bd-links li{width:100%}nav.bd-links li.toctree-l1,nav.bd-links li.toctree-l2,nav.bd-links li.toctree-l3,nav.bd-links li.toctree-l4,nav.bd-links li.toctree-l5{font-size:1em}nav.bd-links li.toctree-l1>a,nav.bd-links li.toctree-l2>a,nav.bd-links li.toctree-l3>a,nav.bd-links li.toctree-l4>a,nav.bd-links li.toctree-l5>a{font-size:0.9em}nav.bd-links>ul.nav{padding-left:0}nav.bd-links>ul.nav ul{padding:0 0 0 1rem}nav.bd-links>ul.nav a{padding:.25rem 0 !important}@media (min-width: 768px){.bd-sidebar,.bd-topbar-whitespace{max-width:275px}}.prev-next-bottom{height:3em}@media print{.tag_popout,div.margin{float:right;clear:right;width:50%;margin-right:-56%;margin-top:0;margin-bottom:0;padding-right:1em;font-size:0.9rem;line-height:1.3;vertical-align:baseline;position:relative;border-left:none;padding-left:0}.bd-content div#main-content>div{flex:0 0 75%;max-width:75%}h1,h2,h3,h4{break-after:avoid}table{break-inside:avoid}pre{word-wrap:break-word}a.copybtn,a.headerlink{display:none}.tag-fullwidth{width:145%;clear:both}div.toggle-hidden{visibility:inherit;opacity:1;height:auto}button.toggle-button{display:none}blockquote.epigraph{border:none}div.container{min-width:50% !important}div.bd-sidebar,div.prev-next-bottom{display:none}div.topbar{height:0;padding:0;position:inherit}div.topbar div.topbar-main{opacity:0}div.topbar div.bd-toc{flex:0 0 25%;max-width:25%;height:auto !important}div.topbar div.bd-toc nav,div.topbar div.bd-toc nav>ul.nav,div.topbar div.bd-toc nav>ul.nav>li>ul.nav{opacity:1;display:block}div.topbar div.bd-toc .nav-link.active{font-weight:inherit;color:inherit;background-color:inherit;border-left:inherit}} 2 | -------------------------------------------------------------------------------- /docs/_static/togglebutton.css: -------------------------------------------------------------------------------- 1 | /* Visibility of the target */ 2 | .toggle, div.admonition.toggle .admonition-title ~ * { 3 | transition: opacity .5s, height .5s; 4 | } 5 | 6 | .toggle-hidden:not(.admonition) { 7 | visibility: hidden; 8 | opacity: 0; 9 | height: 1.5em; 10 | margin: 0px; 11 | padding: 0px; 12 | } 13 | 14 | /* Overrides for admonition toggles */ 15 | 16 | /* Titles should cut off earlier to avoid overlapping w/ button */ 17 | div.admonition.toggle p.admonition-title { 18 | padding-right: 25%; 19 | } 20 | 21 | /* hides all the content of a page until de-toggled */ 22 | div.admonition.toggle-hidden .admonition-title ~ * { 23 | height: 0; 24 | margin: 0; 25 | float: left; /* so they overlap when hidden */ 26 | opacity: 0; 27 | visibility: hidden; 28 | } 29 | 30 | /* Toggle buttons inside admonitions so we see the title */ 31 | .toggle.admonition { 32 | position: relative; 33 | } 34 | 35 | .toggle.admonition.admonition-title:after { 36 | content: "" !important; 37 | } 38 | 39 | /* Note, we'll over-ride this in sphinx-book-theme */ 40 | .toggle.admonition button.toggle-button { 41 | margin-right: 0.5em; 42 | right: 0em; 43 | position: absolute; 44 | top: .2em; 45 | } 46 | 47 | /* General button style */ 48 | button.toggle-button { 49 | background: #999; 50 | border: none; 51 | z-index: 100; 52 | right: -2.5em; 53 | margin-left: -2.5em; /* A hack to keep code blocks from being pushed left */ 54 | position: relative; 55 | float: right; 56 | border-radius: 100%; 57 | width: 1.5em; 58 | height: 1.5em; 59 | padding: 0px; 60 | } 61 | 62 | @media (min-width: 768px) { 63 | button.toggle-button.toggle-button-hidden:before { 64 | content: "Click to show"; 65 | position: absolute; 66 | font-size: .8em; 67 | left: -6.5em; 68 | bottom: .4em; 69 | } 70 | } 71 | 72 | 73 | /* Plus / minus toggles */ 74 | .toggle-button .bar { 75 | background-color: white; 76 | position: absolute; 77 | left: 15%; 78 | top: 43%; 79 | width: 16px; 80 | height: 3px; 81 | } 82 | 83 | .toggle-button .vertical { 84 | transition: all 0.25s ease-in-out; 85 | transform-origin: center; 86 | } 87 | 88 | .toggle-button-hidden .vertical { 89 | transform: rotate(-90deg); 90 | } -------------------------------------------------------------------------------- /docs/_static/togglebutton.js: -------------------------------------------------------------------------------- 1 | var initToggleItems = () => { 2 | var itemsToToggle = document.querySelectorAll(togglebuttonSelector); 3 | console.log(itemsToToggle, togglebuttonSelector) 4 | // Add the button to each admonition and hook up a callback to toggle visibility 5 | itemsToToggle.forEach((item, index) => { 6 | var toggleID = `toggle-${index}`; 7 | var buttonID = `button-${toggleID}`; 8 | var collapseButton = ` 9 | `; 13 | 14 | item.setAttribute('id', toggleID); 15 | 16 | if (!item.classList.contains("toggle")){ 17 | item.classList.add("toggle"); 18 | } 19 | 20 | // If it's an admonition block, then we'll add the button inside 21 | if (item.classList.contains("admonition")) { 22 | item.insertAdjacentHTML("afterbegin", collapseButton); 23 | } else { 24 | item.insertAdjacentHTML('beforebegin', collapseButton); 25 | } 26 | 27 | thisButton = $(`#${buttonID}`); 28 | thisButton.on('click', toggleClickHandler); 29 | if (!item.classList.contains("toggle-shown")) { 30 | toggleHidden(thisButton[0]); 31 | } 32 | }) 33 | }; 34 | 35 | // This should simply add / remove the collapsed class and change the button text 36 | var toggleHidden = (button) => { 37 | target = button.dataset['target'] 38 | var itemToToggle = document.getElementById(target); 39 | if (itemToToggle.classList.contains("toggle-hidden")) { 40 | itemToToggle.classList.remove("toggle-hidden"); 41 | button.classList.remove("toggle-button-hidden"); 42 | } else { 43 | itemToToggle.classList.add("toggle-hidden"); 44 | button.classList.add("toggle-button-hidden"); 45 | } 46 | } 47 | 48 | var toggleClickHandler = (click) => { 49 | button = document.getElementById(click.target.dataset['button']); 50 | toggleHidden(button); 51 | } 52 | 53 | // If we want to blanket-add toggle classes to certain cells 54 | var addToggleToSelector = () => { 55 | const selector = ""; 56 | if (selector.length > 0) { 57 | document.querySelectorAll(selector).forEach((item) => { 58 | item.classList.add("toggle"); 59 | }) 60 | } 61 | } 62 | 63 | // Helper function to run when the DOM is finished 64 | const sphinxToggleRunWhenDOMLoaded = cb => { 65 | if (document.readyState != 'loading') { 66 | cb() 67 | } else if (document.addEventListener) { 68 | document.addEventListener('DOMContentLoaded', cb) 69 | } else { 70 | document.attachEvent('onreadystatechange', function() { 71 | if (document.readyState == 'complete') cb() 72 | }) 73 | } 74 | } 75 | sphinxToggleRunWhenDOMLoaded(addToggleToSelector) 76 | sphinxToggleRunWhenDOMLoaded(initToggleItems) 77 | -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Font Awesome Free License 2 | ------------------------- 3 | 4 | Font Awesome Free is free, open source, and GPL friendly. You can use it for 5 | commercial projects, open source projects, or really almost whatever you want. 6 | Full Font Awesome Free license: https://fontawesome.com/license/free. 7 | 8 | # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) 9 | In the Font Awesome Free download, the CC BY 4.0 license applies to all icons 10 | packaged as SVG and JS file types. 11 | 12 | # Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL) 13 | In the Font Awesome Free download, the SIL OFL license applies to all icons 14 | packaged as web and desktop font files. 15 | 16 | # Code: MIT License (https://opensource.org/licenses/MIT) 17 | In the Font Awesome Free download, the MIT license applies to all non-font and 18 | non-icon files. 19 | 20 | # Attribution 21 | Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font 22 | Awesome Free files already contain embedded comments with sufficient 23 | attribution, so you shouldn't need to do anything additional when using these 24 | files normally. 25 | 26 | We've kept attribution comments terse, so we ask that you do not actively work 27 | to remove them from files, especially code. They're a great way for folks to 28 | learn about Font Awesome. 29 | 30 | # Brand Icons 31 | All brand icons are trademarks of their respective owners. The use of these 32 | trademarks does not indicate endorsement of the trademark holder by Font 33 | Awesome, nor vice versa. **Please do not use brand logos for any purpose except 34 | to represent the company, product, or service to which they refer.** 35 | -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /docs/_static/webpack-macros.html: -------------------------------------------------------------------------------- 1 | 2 | {% macro head_pre_icons() %} 3 | 5 | 7 | 9 | {% endmacro %} 10 | 11 | {% macro head_pre_fonts() %} 12 | {% endmacro %} 13 | 14 | {% macro head_pre_bootstrap() %} 15 | 16 | 17 | {% endmacro %} 18 | 19 | {% macro head_js_preload() %} 20 | 21 | {% endmacro %} 22 | 23 | {% macro body_post() %} 24 | 25 | {% endmacro %} -------------------------------------------------------------------------------- /docs/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/doctrees/glue_cache.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /docs/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/doctrees/index.doctree -------------------------------------------------------------------------------- /docs/doctrees/第一回:Matplotlib初相识/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/doctrees/第一回:Matplotlib初相识/index.doctree -------------------------------------------------------------------------------- /docs/doctrees/第三回:布局格式定方圆/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/doctrees/第三回:布局格式定方圆/index.doctree -------------------------------------------------------------------------------- /docs/doctrees/第二回:艺术画笔见乾坤/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/doctrees/第二回:艺术画笔见乾坤/index.doctree -------------------------------------------------------------------------------- /docs/doctrees/第五回:样式色彩秀芳华/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/doctrees/第五回:样式色彩秀芳华/index.doctree -------------------------------------------------------------------------------- /docs/doctrees/第四回:文字图例尽眉目/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/doctrees/第四回:文字图例尽眉目/index.doctree -------------------------------------------------------------------------------- /docs/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 索引 — fantastic-matplotlib 9 | 10 | 11 | 12 | 13 | 14 | 16 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
54 |
55 | 56 | 108 | 109 | 110 | 111 | 112 | 113 | 114 |
115 | 116 |
117 |
118 | 119 |
120 | 121 | 129 | 130 | 131 | 132 | 133 | 148 | 149 | 150 | 151 | 155 | 156 | 157 | 158 |
159 | 160 | 161 |
162 | 163 |
164 |
165 |
166 |
167 |
168 | 169 |
170 | 171 | 172 |

索引

173 | 174 |
175 | 176 |
177 | 178 | 179 |
180 | 181 | 182 |
183 | 184 | 185 |
186 | 187 |
188 |
189 |
190 |
191 |

192 | 193 | By Datawhale数据可视化开源小组
194 | 195 | © Copyright © Copyright 2021.
196 |

197 |
198 |
199 |
200 | 201 | 202 |
203 |
204 | 205 | 206 | 207 | 208 | 209 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Content — fantastic-matplotlib 9 | 10 | 11 | 12 | 13 | 14 | 16 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
55 |
56 | 57 | 109 | 110 | 111 | 112 | 113 | 114 | 115 |
116 | 117 |
118 |
119 | 120 |
121 | 122 | 130 | 131 | 132 | 148 | 149 | 150 | 151 | 168 | 169 | 170 | 171 | 175 | 176 | 177 | 178 |
179 | 180 | 181 |
182 | 183 |
184 |
185 |
186 |
187 | 246 |
247 |
248 |
249 |

250 | 251 | By Datawhale数据可视化开源小组
252 | 253 | © Copyright © Copyright 2021.
254 |

255 |
256 |
257 |
258 | 259 | 260 |
261 |
262 | 263 | 264 | 265 | 266 | 267 | -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/docs/objects.inv -------------------------------------------------------------------------------- /docs/reports/index.log: -------------------------------------------------------------------------------- 1 | Traceback (most recent call last): 2 | File "c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\jupyter_cache\executors\utils.py", line 51, in single_nb_execution 3 | executenb( 4 | File "c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\nbclient\client.py", line 1112, in execute 5 | return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute() 6 | File "c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\nbclient\util.py", line 74, in wrapped 7 | return just_run(coro(*args, **kwargs)) 8 | File "c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\nbclient\util.py", line 53, in just_run 9 | return loop.run_until_complete(coro) 10 | File "C:\Users\skywater\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete 11 | return future.result() 12 | File "c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\nbclient\client.py", line 553, in async_execute 13 | await self.async_execute_cell( 14 | File "c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\nbclient\client.py", line 857, in async_execute_cell 15 | self._check_raise_for_error(cell, exec_reply) 16 | File "c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\nbclient\client.py", line 760, in _check_raise_for_error 17 | raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content) 18 | nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell: 19 | ------------------ 20 | plt.style.use('https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/main/file/presentation.mplstyle') 21 | plt.plot([1,2,3,4],[2,3,4,5]); 22 | ------------------ 23 | 24 | --------------------------------------------------------------------------- 25 | gaierror Traceback (most recent call last) 26 | ~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args) 27 |  1345 try: 28 | -> 1346 h.request(req.get_method(), req.selector, req.data, headers, 29 |  1347 encode_chunked=req.has_header('Transfer-encoding')) 30 | 31 | ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in request(self, method, url, body, headers, encode_chunked) 32 |  1252 """Send a complete request to the server.""" 33 | -> 1253 self._send_request(method, url, body, headers, encode_chunked) 34 |  1254  35 | 36 | ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked) 37 |  1298 body = _encode(body, 'body') 38 | -> 1299 self.endheaders(body, encode_chunked=encode_chunked) 39 |  1300  40 | 41 | ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in endheaders(self, message_body, encode_chunked) 42 |  1247 raise CannotSendHeader() 43 | -> 1248 self._send_output(message_body, encode_chunked=encode_chunked) 44 |  1249  45 | 46 | ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in _send_output(self, message_body, encode_chunked) 47 |  1007 del self._buffer[:] 48 | -> 1008 self.send(msg) 49 |  1009  50 | 51 | ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in send(self, data) 52 |  947 if self.auto_open: 53 | --> 948 self.connect() 54 |  949 else: 55 | 56 | ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in connect(self) 57 |  1414  58 | -> 1415 super().connect() 59 |  1416  60 | 61 | ~\AppData\Local\Programs\Python\Python39\lib\http\client.py in connect(self) 62 |  918 """Connect to the host and port specified in __init__.""" 63 | --> 919 self.sock = self._create_connection( 64 |  920 (self.host,self.port), self.timeout, self.source_address) 65 | 66 | ~\AppData\Local\Programs\Python\Python39\lib\socket.py in create_connection(address, timeout, source_address) 67 |  821 err = None 68 | --> 822 for res in getaddrinfo(host, port, 0, SOCK_STREAM): 69 |  823 af, socktype, proto, canonname, sa = res 70 | 71 | ~\AppData\Local\Programs\Python\Python39\lib\socket.py in getaddrinfo(host, port, family, type, proto, flags) 72 |  952 addrlist = [] 73 | --> 953 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 74 |  954 af, socktype, proto, canonname, sa = res 75 | 76 | gaierror: [Errno 11004] getaddrinfo failed 77 | 78 | During handling of the above exception, another exception occurred: 79 | 80 | URLError Traceback (most recent call last) 81 | c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\matplotlib\style\core.py in use(style) 82 |  114 try: 83 | --> 115 rc = rc_params_from_file(style, use_default_template=False) 84 |  116 _apply_style(rc) 85 | 86 | c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\matplotlib\__init__.py in rc_params_from_file(fname, fail_on_error, use_default_template) 87 |  797 """ 88 | --> 798 config_from_file = _rc_params_in_file(fname, fail_on_error=fail_on_error) 89 |  799  90 | 91 | c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\matplotlib\__init__.py in _rc_params_in_file(fname, transform, fail_on_error) 92 |  726 rc_temp = {} 93 | --> 727 with _open_file_or_url(fname) as fd: 94 |  728 try: 95 | 96 | ~\AppData\Local\Programs\Python\Python39\lib\contextlib.py in __enter__(self) 97 |  116 try: 98 | --> 117 return next(self.gen) 99 |  118 except StopIteration: 100 | 101 | c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\matplotlib\__init__.py in _open_file_or_url(fname) 102 |  697 ) 103 | --> 698 with urllib.request.urlopen(fname, context=ssl_ctx) as f: 104 |  699 yield (line.decode('utf-8') for line in f) 105 | 106 | ~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 107 |  213 opener = _opener 108 | --> 214 return opener.open(url, data, timeout) 109 |  215  110 | 111 | ~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in open(self, fullurl, data, timeout) 112 |  516 sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method()) 113 | --> 517 response = self._open(req, data) 114 |  518  115 | 116 | ~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in _open(self, req, data) 117 |  533 protocol = req.type 118 | --> 534 result = self._call_chain(self.handle_open, protocol, protocol + 119 |  535 '_open', req) 120 | 121 | ~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args) 122 |  493 func = getattr(handler, meth_name) 123 | --> 494 result = func(*args) 124 |  495 if result is not None: 125 | 126 | ~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in https_open(self, req) 127 |  1388 def https_open(self, req): 128 | -> 1389 return self.do_open(http.client.HTTPSConnection, req, 129 |  1390 context=self._context, check_hostname=self._check_hostname) 130 | 131 | ~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args) 132 |  1348 except OSError as err: # timeout error 133 | -> 1349 raise URLError(err) 134 |  1350 r = h.getresponse() 135 | 136 | URLError: 137 | 138 | The above exception was the direct cause of the following exception: 139 | 140 | OSError Traceback (most recent call last) 141 |  in  142 | ----> 1 plt.style.use('https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/main/file/presentation.mplstyle') 143 |  2 plt.plot([1,2,3,4],[2,3,4,5]); 144 | 145 | c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\matplotlib\style\core.py in use(style) 146 |  116 _apply_style(rc) 147 |  117 except IOError as err: 148 | --> 118 raise IOError( 149 |  119 "{!r} not found in the style library and input is not a " 150 |  120 "valid URL or path; see `style.available` for list of " 151 | 152 | OSError: 'https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/main/file/presentation.mplstyle' not found in the style library and input is not a valid URL or path; see `style.available` for list of available styles 153 | OSError: 'https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/main/file/presentation.mplstyle' not found in the style library and input is not a valid URL or path; see `style.available` for list of available styles 154 | 155 | -------------------------------------------------------------------------------- /docs/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 搜索 — fantastic-matplotlib 9 | 10 | 11 | 12 | 13 | 14 | 16 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
60 |
61 | 62 | 114 | 115 | 116 | 117 | 118 | 119 | 120 |
121 | 122 |
123 |
124 | 125 |
126 | 127 | 135 | 136 | 137 | 138 | 139 | 154 | 155 | 156 | 157 | 161 | 162 | 163 | 164 |
165 | 166 | 167 |
168 | 169 |
170 |
171 |
172 |
173 |
174 | 175 |
176 | 177 |

搜索

178 |
179 | 180 |

181 | 请激活 JavaScript 以开启搜索功能。 182 |

183 |
184 |

185 | Searching for multiple words only shows matches that contain 186 | all words. 187 |

188 |
189 | 190 | 191 | 192 |
193 | 194 |
195 | 196 |
197 | 198 |
199 | 200 | 201 |
202 | 203 | 204 |
205 | 206 |
207 |
208 |
209 |
210 |

211 | 212 | By Datawhale数据可视化开源小组
213 | 214 | © Copyright © Copyright 2021.
215 |

216 |
217 |
218 |
219 | 220 | 221 |
222 |
223 | 224 | 225 | 226 | 227 | 228 | -------------------------------------------------------------------------------- /docs/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({docnames:["index","\u7b2c\u4e00\u56de\uff1aMatplotlib\u521d\u76f8\u8bc6/index","\u7b2c\u4e09\u56de\uff1a\u5e03\u5c40\u683c\u5f0f\u5b9a\u65b9\u5706/index","\u7b2c\u4e8c\u56de\uff1a\u827a\u672f\u753b\u7b14\u89c1\u4e7e\u5764/index","\u7b2c\u4e94\u56de\uff1a\u6837\u5f0f\u8272\u5f69\u79c0\u82b3\u534e/index","\u7b2c\u56db\u56de\uff1a\u6587\u5b57\u56fe\u4f8b\u5c3d\u7709\u76ee/index"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["index.md","\u7b2c\u4e00\u56de\uff1aMatplotlib\u521d\u76f8\u8bc6\\index.md","\u7b2c\u4e09\u56de\uff1a\u5e03\u5c40\u683c\u5f0f\u5b9a\u65b9\u5706\\index.md","\u7b2c\u4e8c\u56de\uff1a\u827a\u672f\u753b\u7b14\u89c1\u4e7e\u5764\\index.md","\u7b2c\u4e94\u56de\uff1a\u6837\u5f0f\u8272\u5f69\u79c0\u82b3\u534e\\index.md","\u7b2c\u56db\u56de\uff1a\u6587\u5b57\u56fe\u4f8b\u5c3d\u7709\u76ee\\index.md"],objects:{},objnames:{},objtypes:{},terms:{"05":[3,5],"0f0f0f":4,"0f0f0f80":4,"0x0000020c25e80940":3,"0x0000020c25e80cd0":3,"0x23155916dc0":1,"10":[2,3,4,5],"100":[1,3,5],"1000":[3,5],"101":3,"11":3,"111":3,"125":3,"14":5,"15":[3,5],"150":2,"16":[3,4,5],"162":3,"17":3,"1981":2,"1990":2,"1f":[3,5],"20":[2,3,4,5],"200":2,"2017":5,"21":5,"211":3,"224":2,"24":4,"25":[3,5],"26":4,"28":5,"2d":1,"2f":[3,5],"30":[3,5],"324":3,"343182":3,"360":3,"45":3,"50":4,"536818":3,"54":3,"5f":5,"70":5,"75":2,"775x0":3,"90":[3,5],"95":3,"class":3,"default":4,"float":5,"for":[2,3,5],"if":[2,5],"import":[1,2,3,4,5],"in":[2,3,5],"int":3,"return":5,"true":[2,3,5],"with":5,_classic_test_patch:4,abcd:2,add:3,add_ax:3,add_collect:3,add_gridspec:2,add_lin:3,add_patch:3,add_subplot:[2,3,5],ai:3,align:3,all:3,alpha:[2,3,4,5],and:[3,4],angl:3,antialias:3,api:1,arang:[3,5],arc3:5,area:[2,3],arg:[3,5],arrai:3,arrowprop:5,arrowstyl:5,as:[1,2,3,4,5],ascend:3,aspect:3,ast_node_interact:3,astyp:3,at:[1,3],autoloc:5,autopct:3,avail:4,ax1:3,ax2:3,ax:[1,2,3,5],axes:[0,1,2,4],axesimag:3,axessubplot:3,axhlin:2,axi:[1,5],axlin:2,axs:[2,3,5],axvlin:2,backend_bas:3,backgroundcolor:5,bar:3,bar_label:5,barsabov:3,barstack:3,base:5,baselin:5,bbox:5,bessel:3,best:5,bicub:3,bilinear:3,bin:3,black:[4,5],block:5,blue:[4,5],bmh:4,bold:5,book:5,bool:3,both:5,bottom:[3,5],box:5,bright:4,by:5,bymonthdai:5,canva:3,capsiz:3,capstyl:3,capthick:3,catrom:3,center:[3,5],center_baselin:5,chart:3,circl:3,circlecollect:3,classic:4,close:3,cmap:[2,3,4],co:3,code:5,color:[0,2,3,5],colorblind10:4,colorblind:4,colorhexa:4,column:3,com:4,connectionstyl:5,contain:[0,1],coord:5,core:3,cos:5,count:3,counterclock:3,csv:2,cubic:1,current:3,cursiv:5,cut:3,cyan:4,cyclic:4,dai:5,dark:4,dark_background:4,darkgrid:4,dash_capstyl:3,dash_joinstyl:3,data:[2,3,5],data_interv:3,datafram:3,date:5,dateformatt:5,datetim:5,dayloc:5,deep:4,def:5,delax:3,demi:5,demibold:5,densiti:3,descript:5,df:3,df_cnt:3,dict:5,diverg:4,dog:3,down:5,drawn:3,drawstyl:3,drop:3,drug:3,ecolor:3,edgecolor:[3,5],elinewidth:3,els:[2,5],ensur:3,entri:5,enumer:5,equal:3,error:3,errorbar:3,erroreveri:3,exp:5,explod:3,extent:3,extra:5,facecolor:[3,5],fals:[2,3,5],famili:5,fancybboxpatch:5,fantasi:5,fast:4,fenzu:3,fig1:3,fig:[1,2,3,5],figsiz:[2,3,5],figtext:5,figur:[0,2],figurecanva:3,figureimag:3,file:4,fill:3,fillstyl:3,filternorm:3,filterrad:3,findal:3,first:3,five:5,fivethirtyeight:4,fixedloc:5,flat:[3,5],fmt:3,font:[2,5],fontdict:5,fontfamili:5,fontnam:5,fontproperti:5,fontsiz:5,fontstyl:5,fontweight:5,format:5,formatoddtick:5,formatstrformatt:[3,5],formatt:3,four:5,frame:3,frameon:5,frog:3,from:3,fuchsia:3,funcformatt:5,gaussian:3,get_data_interv:3,get_ticklabel:3,get_ticklin:[3,5],get_tickloc:3,get_view_interv:3,ggplot:4,github:2,grai:5,grayscal:4,green:[3,4],grid:[2,3],gridlin:3,ha:5,ham:3,han:3,handl:5,hatch:3,heavi:5,height:3,height_ratio:2,helper:3,hermit:3,hist:3,histogram:3,histtyp:3,hog:3,horizont:5,horizontalalign:5,hsv:2,html:4,http:4,imlim:3,imshow:3,include_lowest:3,index:[2,3],indexloc:5,inplac:3,interactiveshel:3,interp_method:3,interpol:3,ipython:[1,3],is:[3,5],ital:5,joinstyl:3,jupyt:1,kaiser:3,kei:5,kwarg:[3,5],label1:3,label2:3,label:[1,3,5],labelcolor:3,labeldist:3,labelleft:3,labelpad:5,labelright:3,labels:4,lambda:3,lanczo:3,larg:5,layout_ex1:2,left:[3,5],legend:[0,1,3],len:[3,5],light:5,lightgoldenrodyellow:3,lightslategrai:3,line2d:[1,5],line:[1,4,5],line_down:5,line_up:5,linear:[1,3],linearloc:5,linespac:5,linestyl:[1,3,4],linewidth:[1,3,4],linspac:[1,3,5],list:[2,5],loc:[3,5],locat:3,log:[2,3],lolim:3,lower:5,lw:3,magenta:4,major:3,map:3,marker:[3,5],markeredgecolor:3,markeredgewidth:3,markerfacecolor:3,markerfacecoloralt:3,markers:[3,4],markeveri:3,matlab:1,matplotlib:[0,2,5],maxi:3,maxnloc:5,mdate:5,medium:5,method:3,microsoft:5,mid:3,mini:3,minor:3,miscellan:4,mitchel:3,modifi:5,monospac:5,mpl:[1,4],mplstyle:4,multipl:5,multipleloc:5,mute:4,nbin:5,ncol:[2,3],nearest:3,none:[3,5],norm:3,normal:[3,5],notebook:[1,4],np:[1,2,3,4,5],nrow:[2,3],numer:5,numpi:[1,2,3,4,5],numtick:5,object:[0,1,5],obliqu:5,odd:5,of:5,offset:5,one:5,oo:[1,2,5],or:5,orang:3,org:4,orient:[1,5],origin:3,pa:3,pad:5,palett:4,panda:[1,2,3],paper:4,pass:2,pastel:4,patch:5,patchcollect:3,pathcollect:3,pattern:5,pctdistanc:3,pd:[2,3],pi:[2,3,5],pickradiu:3,pie:3,plot:[1,2,3,4,5],plotnonfinit:3,plt:[1,3,4,5],polar:2,polycollect:3,pos:5,posit:5,poster:4,present:4,primit:0,print:[3,4,5],project:2,prop:5,properti:5,pyplot:[1,2,3,4,5],python:[1,4],quadrat:1,quadric:3,qualit:4,rad:5,radiu:3,rand:[2,3],randint:3,randn:[2,4],random:[2,3,4],rang:[2,3,5],ratio:3,rc:[1,4],rcparam:[2,5],rdpu:4,re:3,rect:3,red:[3,4,5],regular:5,regularpolycollect:3,render:3,resampl:3,reset_index:3,right:[3,5],roman:5,rotat:5,rotatelabel:3,san:[2,5],scatter:[2,3,4],score:3,seaborn:[1,4],self:3,semibold:5,sequenti:4,serif:[2,5],set_antialias:3,set_arrai:3,set_color:3,set_facecolor:3,set_fonts:3,set_major_formatt:[3,5],set_major_loc:5,set_markeredgecolor:3,set_markeredgewidth:3,set_markers:3,set_minor_formatt:5,set_minor_loc:5,set_rot:3,set_tick:5,set_tick_param:3,set_ticklabel:5,set_ticks_posit:5,set_titl:[1,2,3,5],set_xlabel:[1,2,5],set_xlim:[2,3],set_xscal:2,set_xtick:5,set_xticklabel:5,set_ylabel:[1,2,5],set_ylim:[2,3],set_yscal:2,setp:3,shadow:3,shape:3,share:3,sharei:2,sharex:2,shell:1,show:[1,3],shrink:5,simhei:2,simpl:1,simsun:5,sin:3,sinc:3,six:5,size:[2,3,5],small:5,solarize_light2:4,solid_capstyl:3,solid_joinstyl:3,sort_valu:3,spec:2,spline16:3,spline36:3,stabl:4,stack:3,startangl:3,state:3,step1:1,step2:1,step3:1,step4:1,step5:1,step:3,stepfil:3,str:3,string:5,strmethodformatt:5,style:[0,1,5],sub1:2,sub2:2,sub3:2,sub4:2,sub5:2,subplot:[1,3,5],subplot_kw:3,sum:3,suptitl:2,tableau:4,talk:4,tan:4,text:3,textcoord:5,textprop:3,that:3,the:3,theta1:3,theta2:3,theta:2,thi:5,three:5,tick1:3,tick1lin:3,tick2:3,tick2lin:3,tick:[0,1,4],tick_param:5,ticker:[3,5],tickla:5,ticklabel:5,ticklin:5,tight_layout:[2,3,5],time:5,timedelta:5,titl:1,titles:4,top:5,trick:1,truetyp:5,tupl:3,tutori:4,two:5,ultralight:5,unicod:5,unicode_minu:[2,5],up:5,uplim:3,upper:5,url:3,use:4,va:5,valu:5,value_count:3,vert:3,vertic:5,verticalalign:5,view_interv:3,viridi:3,vmax:3,vmin:3,web:1,wedgeprop:3,weight:5,which:3,white:4,whitegrid:4,width:3,width_ratio:2,window:1,www:4,x1:5,xaxi:[3,5],xdata:3,xerr:3,xlabel:[1,3],xlim:3,xlolim:3,xscal:3,xtick:[3,4],xuplim:3,xx:5,xy:[3,5],xycoord:5,xytext:5,y1:[3,5],y2:3,yahei:5,yaxi:3,ydata:3,yellow:[3,4],yerr:3,ylabel:[1,3],ytick:[3,4],yyyi:3,zero:5,zip:3},titles:["Content","\u7b2c\u4e00\u56de\uff1aMatplotlib\u521d\u76f8\u8bc6","\u7b2c\u4e09\u56de\uff1a\u5e03\u5c40\u683c\u5f0f\u5b9a\u65b9\u5706","\u7b2c\u4e8c\u56de\uff1a\u827a\u672f\u753b\u7b14\u89c1\u4e7e\u5764","\u7b2c\u4e94\u56de\uff1a\u6837\u5f0f\u8272\u5f69\u79c0\u82b3\u534e","\u7b2c\u56db\u56de\uff1a\u6587\u5b57\u56fe\u4f8b\u5c3d\u7709\u76ee"],titleterms:{"2dline":3,and:5,annot:5,api:[3,5],artist:3,axes:[3,5],axi:3,collect:3,color:4,colormap:4,contain:3,content:0,figur:[1,3,5],formatt:5,gridspec:2,hex:4,imag:3,legend:5,line2d:3,line:3,locat:5,matplotlib:[1,3,4],object:3,patch:3,plt:2,polygon:3,primit:3,rcparam:4,rectangl:3,rgb:4,rgba:4,style:4,stylesheet:4,subplot:2,suptitl:5,text:5,tick:[3,5],titl:5,wedg:3,xlabel:5,ylabel:5}}) -------------------------------------------------------------------------------- /file/presentation.mplstyle: -------------------------------------------------------------------------------- 1 | axes.titlesize : 24 2 | axes.labelsize : 20 3 | lines.linewidth : 3 4 | lines.markersize : 10 5 | xtick.labelsize : 16 6 | ytick.labelsize : 16 -------------------------------------------------------------------------------- /source/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/e77c393d4ba48db26f681f69cae3b1eb8d1aac9d/source/_static/logo.png -------------------------------------------------------------------------------- /source/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | # import os 14 | # import sys 15 | # sys.path.insert(0, os.path.abspath('.')) 16 | 17 | 18 | # -- Project information ----------------------------------------------------- 19 | 20 | project = 'fantastic matplotlib' 21 | copyright = '© Copyright 2021' 22 | author = 'Datawhale数据可视化开源小组' 23 | 24 | # The full version, including alpha/beta/rc tags 25 | release = '1' 26 | 27 | 28 | # -- General configuration --------------------------------------------------- 29 | 30 | # Add any Sphinx extension module names here, as strings. They can be 31 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 32 | # ones. 33 | extensions = [ 34 | "myst_nb", 35 | "sphinx.ext.mathjax", 36 | "matplotlib.sphinxext.plot_directive", 37 | "IPython.sphinxext.ipython_directive", 38 | "IPython.sphinxext.ipython_console_highlighting", 39 | ] 40 | 41 | # Add any paths that contain templates here, relative to this directory. 42 | templates_path = ['_templates'] 43 | 44 | # The language for content autogenerated by Sphinx. Refer to documentation 45 | # for a list of supported languages. 46 | # 47 | # This is also used if you do content translation via gettext catalogs. 48 | # Usually you set "language" from the command line for these cases. 49 | language = 'zh' 50 | 51 | # List of patterns, relative to source directory, that match files and 52 | # directories to ignore when looking for source files. 53 | # This pattern also affects html_static_path and html_extra_path. 54 | exclude_patterns = [] 55 | 56 | 57 | # -- Options for HTML output ------------------------------------------------- 58 | 59 | # The theme to use for HTML and HTML Help pages. See the documentation for 60 | # a list of builtin themes. 61 | # 62 | html_theme = 'sphinx_book_theme' 63 | 64 | # Add any paths that contain custom static files (such as style sheets) here, 65 | # relative to this directory. They are copied after the builtin static files, 66 | # so a file named "default.css" will overwrite the builtin "default.css". 67 | html_static_path = ['_static'] 68 | 69 | html_theme_options = { 70 | "repository_url": "https://github.com/datawhalechina/fantastic-matplotlib", 71 | "use_repository_button": True, 72 | "use_issues_button": True, 73 | "use_edit_page_button": True, 74 | 75 | } 76 | 77 | html_title = "fantastic-matplotlib" 78 | html_logo = "_static/logo.png" 79 | html_favicon = "_static/logo.png" -------------------------------------------------------------------------------- /source/index.md: -------------------------------------------------------------------------------- 1 | # Content 2 | 3 | 4 | 5 | ```{toctree} 6 | :maxdepth: 2 7 | 8 | 9 | 第一回:Matplotlib初相识/index 10 | 第二回:艺术画笔见乾坤/index 11 | 第三回:布局格式定方圆/index 12 | 第四回:文字图例尽眉目/index 13 | 第五回:样式色彩秀芳华/index 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /source/第一回:Matplotlib初相识/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | text_representation: 4 | format_name: myst 5 | kernelspec: 6 | display_name: Python 3 7 | name: python3 8 | --- 9 | # 第一回:Matplotlib初相识 10 | 11 | 12 | 13 | ## 一、认识matplotlib 14 | 15 | Matplotlib是一个Python 2D绘图库,能够以多种硬拷贝格式和跨平台的交互式环境生成出版物质量的图形,用来绘制各种静态,动态,交互式的图表。 16 | 17 | Matplotlib可用于Python脚本,Python和IPython Shell、Jupyter notebook,Web应用程序服务器和各种图形用户界面工具包等。 18 | 19 | Matplotlib是Python数据可视化库中的泰斗,它已经成为python中公认的数据可视化工具,我们所熟知的pandas和seaborn的绘图接口其实也是基于matplotlib所作的高级封装。 20 | 21 | 为了对matplotlib有更好的理解,让我们从一些最基本的概念开始认识它,再逐渐过渡到一些高级技巧中。 22 | 23 | ## 二、一个最简单的绘图例子 24 | 25 | Matplotlib的图像是画在figure(如windows,jupyter窗体)上的,每一个figure又包含了一个或多个axes(一个可以指定坐标系的子区域)。最简单的创建figure以及axes的方式是通过`pyplot.subplots`命令,创建axes以后,可以使用`Axes.plot`绘制最简易的折线图。 26 | 27 | 28 | ```{code-cell} ipython3 29 | import matplotlib.pyplot as plt 30 | import matplotlib as mpl 31 | import numpy as np 32 | ``` 33 | 34 | 35 | ```{code-cell} ipython3 36 | fig, ax = plt.subplots() # 创建一个包含一个axes的figure 37 | ax.plot([1, 2, 3, 4], [1, 4, 2, 3]); # 绘制图像 38 | ``` 39 | 40 | **Trick**: 41 | 在jupyter notebook中使用matplotlib时会发现,代码运行后自动打印出类似``这样一段话,这是因为matplotlib的绘图代码默认打印出最后一个对象。如果不想显示这句话,有以下三种方法,在本章节的代码示例中你能找到这三种方法的使用。 42 | 43 | 1. 在代码块最后加一个分号`;` 44 | 2. 在代码块最后加一句plt.show() 45 | 3. 在绘图时将绘图对象显式赋值给一个变量,如将plt.plot([1, 2, 3, 4]) 改成line =plt.plot([1, 2, 3, 4]) 46 | 47 | 48 | 49 | 和MATLAB命令类似,你还可以通过一种更简单的方式绘制图像,`matplotlib.pyplot`方法能够直接在当前axes上绘制图像,如果用户未指定axes,matplotlib会帮你自动创建一个。所以上面的例子也可以简化为以下这一行代码。 50 | 51 | 52 | ```{code-cell} ipython3 53 | line =plt.plot([1, 2, 3, 4], [1, 4, 2, 3]) 54 | ``` 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | ## 三、Figure的组成 65 | 66 | 现在我们来深入看一下figure的组成。通过一张figure解剖图,我们可以看到一个完整的matplotlib图像通常会包括以下四个层级,这些层级也被称为容器(container),下一节会详细介绍。在matplotlib的世界中,我们将通过各种命令方法来操纵图像中的每一个部分,从而达到数据可视化的最终效果,一副完整的图像实际上是各类子元素的集合。 67 | 68 | - `Figure`:顶层级,用来容纳所有绘图元素 69 | 70 | - `Axes`:matplotlib宇宙的核心,容纳了大量元素用来构造一幅幅子图,一个figure可以由一个或多个子图组成 71 | 72 | - `Axis`:axes的下属层级,用于处理所有和坐标轴,网格有关的元素 73 | 74 | - `Tick`:axis的下属层级,用来处理所有和刻度有关的元素 75 | 76 | ![](https://matplotlib.org/_images/anatomy.png) 77 | 78 | ## 四、两种绘图接口 79 | 80 | matplotlib提供了两种最常用的绘图接口 81 | 82 | 1. 显式创建figure和axes,在上面调用绘图方法,也被称为OO模式(object-oriented style) 83 | 84 | 2. 依赖pyplot自动创建figure和axes,并绘图 85 | 86 | 使用第一种绘图接口,是这样的: 87 | 88 | 89 | ```{code-cell} ipython3 90 | x = np.linspace(0, 2, 100) 91 | 92 | fig, ax = plt.subplots() 93 | ax.plot(x, x, label='linear') 94 | ax.plot(x, x**2, label='quadratic') 95 | ax.plot(x, x**3, label='cubic') 96 | ax.set_xlabel('x label') 97 | ax.set_ylabel('y label') 98 | ax.set_title("Simple Plot") 99 | ax.legend() 100 | plt.show() 101 | ``` 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 而如果采用第二种绘图接口,绘制同样的图,代码是这样的: 114 | 115 | 116 | ```{code-cell} ipython3 117 | x = np.linspace(0, 2, 100) 118 | 119 | plt.plot(x, x, label='linear') 120 | plt.plot(x, x**2, label='quadratic') 121 | plt.plot(x, x**3, label='cubic') 122 | plt.xlabel('x label') 123 | plt.ylabel('y label') 124 | plt.title("Simple Plot") 125 | plt.legend() 126 | plt.show() 127 | ``` 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | ## 五、通用绘图模板 137 | 由于matplotlib的知识点非常繁杂,在实际使用过程中也不可能将全部API都记住,很多时候都是边用边查。因此这里提供一个通用的绘图基础模板,任何复杂的图表几乎都可以基于这个模板骨架填充内容而成。初学者刚开始学习时只需要牢记这一模板就足以应对大部分简单图表的绘制,在学习过程中可以将这个模板模块化,了解每个模块在做什么,在绘制复杂图表时如何修改,填充对应的模块。 138 | 139 | 140 | ```{code-cell} ipython3 141 | # step1 准备数据 142 | x = np.linspace(0, 2, 100) 143 | y = x**2 144 | 145 | # step2 设置绘图样式,这一模块的扩展参考第五章进一步学习,这一步不是必须的,样式也可以在绘制图像是进行设置 146 | mpl.rc('lines', linewidth=4, linestyle='-.') 147 | 148 | # step3 定义布局, 这一模块的扩展参考第三章进一步学习 149 | fig, ax = plt.subplots() 150 | 151 | # step4 绘制图像, 这一模块的扩展参考第二章进一步学习 152 | ax.plot(x, y, label='linear') 153 | 154 | # step5 添加标签,文字和图例,这一模块的扩展参考第四章进一步学习 155 | ax.set_xlabel('x label') 156 | ax.set_ylabel('y label') 157 | ax.set_title("Simple Plot") 158 | ax.legend() ; 159 | ``` 160 | 161 | 162 | 163 | 164 | ​ 165 | 166 | ## 思考题 167 | - 请思考两种绘图模式的优缺点和各自适合的使用场景 168 | - 在第五节绘图模板中我们是以OO模式作为例子展示的,请思考并写一个pyplot绘图模式的简单模板 169 | 170 | -------------------------------------------------------------------------------- /source/第三回:布局格式定方圆/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | text_representation: 4 | format_name: myst 5 | kernelspec: 6 | display_name: Python 3 7 | name: python3 8 | --- 9 | 10 | # 第三回:布局格式定方圆 11 | 12 | 13 | ```{code-cell} ipython3 14 | import numpy as np 15 | import pandas as pd 16 | import matplotlib.pyplot as plt 17 | plt.rcParams['font.sans-serif'] = ['SimHei'] #用来正常显示中文标签 18 | plt.rcParams['axes.unicode_minus'] = False #用来正常显示负号 19 | ``` 20 | 21 | ## 一、子图 22 | 23 | ### 1. 使用 `plt.subplots` 绘制均匀状态下的子图 24 | 25 | 返回元素分别是画布和子图构成的列表,第一个数字为行,第二个为列,不传入时默认值都为1 26 | 27 | `figsize` 参数可以指定整个画布的大小 28 | 29 | `sharex` 和 `sharey` 分别表示是否共享横轴和纵轴刻度 30 | 31 | `tight_layout` 函数可以调整子图的相对大小使字符不会重叠 32 | 33 | 34 | ```{code-cell} ipython3 35 | fig, axs = plt.subplots(2, 5, figsize=(10, 4), sharex=True, sharey=True) 36 | fig.suptitle('样例1', size=20) 37 | for i in range(2): 38 | for j in range(5): 39 | axs[i][j].scatter(np.random.randn(10), np.random.randn(10)) 40 | axs[i][j].set_title('第%d行,第%d列'%(i+1,j+1)) 41 | axs[i][j].set_xlim(-5,5) 42 | axs[i][j].set_ylim(-5,5) 43 | if i==1: axs[i][j].set_xlabel('横坐标') 44 | if j==0: axs[i][j].set_ylabel('纵坐标') 45 | fig.tight_layout() 46 | ``` 47 | 48 | 49 | ​ 50 | ​ 51 | 52 | 53 | `subplots`是基于OO模式的写法,显式创建一个或多个axes对象,然后在对应的子图对象上进行绘图操作。 54 | 还有种方式是使用`subplot`这样基于pyplot模式的写法,每次在指定位置新建一个子图,并且之后的绘图操作都会指向当前子图,本质上`subplot`也是`Figure.add_subplot`的一种封装。 55 | 56 | 在调用`subplot`时一般需要传入三位数字,分别代表总行数,总列数,当前子图的index 57 | 58 | 59 | ```{code-cell} ipython3 60 | plt.figure() 61 | # 子图1 62 | plt.subplot(2,2,1) 63 | plt.plot([1,2], 'r') 64 | # 子图2 65 | plt.subplot(2,2,2) 66 | plt.plot([1,2], 'b') 67 | #子图3 68 | plt.subplot(224) # 当三位数都小于10时,可以省略中间的逗号,这行命令等价于plt.subplot(2,2,4) 69 | plt.plot([1,2], 'g'); 70 | ``` 71 | 72 | 73 | ​ 74 | 75 | ​ 76 | 77 | 78 | 除了常规的直角坐标系,也可以通过`projection`方法创建极坐标系下的图表 79 | 80 | 81 | ```{code-cell} ipython3 82 | N = 150 83 | r = 2 * np.random.rand(N) 84 | theta = 2 * np.pi * np.random.rand(N) 85 | area = 200 * r**2 86 | colors = theta 87 | 88 | 89 | plt.subplot(projection='polar') 90 | plt.scatter(theta, r, c=colors, s=area, cmap='hsv', alpha=0.75); 91 | ``` 92 | 93 | 94 | ```{admonition} 练一练 95 |

请思考如何用极坐标系画出类似的玫瑰图

96 | 97 | 98 | ``` 99 | 100 | 101 | 102 | 103 | ### 2. 使用 `GridSpec` 绘制非均匀子图 104 | 105 | 所谓非均匀包含两层含义,第一是指图的比例大小不同但没有跨行或跨列,第二是指图为跨列或跨行状态 106 | 107 | 利用 `add_gridspec` 可以指定相对宽度比例 `width_ratios` 和相对高度比例参数 `height_ratios` 108 | 109 | 110 | ```{code-cell} ipython3 111 | fig = plt.figure(figsize=(10, 4)) 112 | spec = fig.add_gridspec(nrows=2, ncols=5, width_ratios=[1,2,3,4,5], height_ratios=[1,3]) 113 | fig.suptitle('样例2', size=20) 114 | for i in range(2): 115 | for j in range(5): 116 | ax = fig.add_subplot(spec[i, j]) 117 | ax.scatter(np.random.randn(10), np.random.randn(10)) 118 | ax.set_title('第%d行,第%d列'%(i+1,j+1)) 119 | if i==1: ax.set_xlabel('横坐标') 120 | if j==0: ax.set_ylabel('纵坐标') 121 | fig.tight_layout() 122 | ``` 123 | 124 | 125 | ​ 126 | 127 | ​ 128 | 129 | 130 | 在上面的例子中出现了 `spec[i, j]` 的用法,事实上通过切片就可以实现子图的合并而达到跨图的共能 131 | 132 | 133 | ```{code-cell} ipython3 134 | fig = plt.figure(figsize=(10, 4)) 135 | spec = fig.add_gridspec(nrows=2, ncols=6, width_ratios=[2,2.5,3,1,1.5,2], height_ratios=[1,2]) 136 | fig.suptitle('样例3', size=20) 137 | # sub1 138 | ax = fig.add_subplot(spec[0, :3]) 139 | ax.scatter(np.random.randn(10), np.random.randn(10)) 140 | # sub2 141 | ax = fig.add_subplot(spec[0, 3:5]) 142 | ax.scatter(np.random.randn(10), np.random.randn(10)) 143 | # sub3 144 | ax = fig.add_subplot(spec[:, 5]) 145 | ax.scatter(np.random.randn(10), np.random.randn(10)) 146 | # sub4 147 | ax = fig.add_subplot(spec[1, 0]) 148 | ax.scatter(np.random.randn(10), np.random.randn(10)) 149 | # sub5 150 | ax = fig.add_subplot(spec[1, 1:5]) 151 | ax.scatter(np.random.randn(10), np.random.randn(10)) 152 | fig.tight_layout() 153 | ``` 154 | 155 | 156 | ​ 157 | 158 | ​ 159 | 160 | 161 | ## 二、子图上的方法 162 | 163 | 补充介绍一些子图上的方法 164 | 165 | 常用直线的画法为: `axhline, axvline, axline` (水平、垂直、任意方向) 166 | 167 | 168 | ```{code-cell} ipython3 169 | fig, ax = plt.subplots(figsize=(4,3)) 170 | ax.axhline(0.5,0.2,0.8) 171 | ax.axvline(0.5,0.2,0.8) 172 | ax.axline([0.3,0.3],[0.7,0.7]); 173 | ``` 174 | 175 | 176 | ​ 177 | 178 | ​ 179 | 180 | 181 | 使用 `grid` 可以加灰色网格 182 | 183 | 184 | ```{code-cell} ipython3 185 | fig, ax = plt.subplots(figsize=(4,3)) 186 | ax.grid(True) 187 | ``` 188 | 189 | 190 | ​ 191 | 192 | ​ 193 | 194 | 195 | 使用 `set_xscale` 可以设置坐标轴的规度(指对数坐标等) 196 | 197 | 198 | ```{code-cell} ipython3 199 | fig, axs = plt.subplots(1, 2, figsize=(10, 4)) 200 | for j in range(2): 201 | axs[j].plot(list('abcd'), [10**i for i in range(4)]) 202 | if j==0: 203 | axs[j].set_yscale('log') 204 | else: 205 | pass 206 | fig.tight_layout() 207 | ``` 208 | 209 | 210 | ​ 211 | 212 | ​ 213 | 214 | 215 | ## 思考题 216 | 217 | - 墨尔本1981年至1990年的每月温度情况 218 | 219 | 数据集来自github仓库下data/layout_ex1.csv 220 | 请利用数据,画出如下的图: 221 | 222 | 223 | 224 | 225 | 226 | - 画出数据的散点图和边际分布 227 | 228 | 用 `np.random.randn(2, 150)` 生成一组二维数据,使用两种非均匀子图的分割方法,做出该数据对应的散点图和边际分布图 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | -------------------------------------------------------------------------------- /source/第五回:样式色彩秀芳华/file/presentation.mplstyle: -------------------------------------------------------------------------------- 1 | axes.titlesize : 24 2 | axes.labelsize : 20 3 | lines.linewidth : 3 4 | lines.markersize : 10 5 | xtick.labelsize : 16 6 | ytick.labelsize : 16 -------------------------------------------------------------------------------- /source/第五回:样式色彩秀芳华/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | text_representation: 4 | format_name: myst 5 | kernelspec: 6 | display_name: Python 3 7 | name: python3 8 | --- 9 | # 第五回:样式色彩秀芳华 10 | ```{code-cell} ipython3 11 | import matplotlib as mpl 12 | import matplotlib.pyplot as plt 13 | import numpy as np 14 | ``` 15 | 16 | 第五回详细介绍matplotlib中样式和颜色的使用,绘图样式和颜色是丰富可视化图表的重要手段,因此熟练掌握本章可以让可视化图表变得更美观,突出重点和凸显艺术性。 17 | 关于绘图样式,常见的有3种方法,分别是修改预定义样式,自定义样式和rcparams。 18 | 关于颜色使用,本章介绍了常见的5种表示单色颜色的基本方法,以及colormap多色显示的方法。 19 | 20 | ## 一、matplotlib的绘图样式(style) 21 | 22 | 在matplotlib中,要想设置绘制样式,最简单的方法是在绘制元素时单独设置样式。 23 | 但是有时候,当用户在做专题报告时,往往会希望保持整体风格的统一而不用对每张图一张张修改,因此matplotlib库还提供了四种批量修改全局样式的方式 24 | 25 | ### 1.matplotlib预先定义样式 26 | 27 | matplotlib贴心地提供了许多内置的样式供用户使用,使用方法很简单,只需在python脚本的最开始输入想使用style的名称即可调用,尝试调用不同内置样式,比较区别 28 | 29 | 30 | 31 | 32 | 33 | ```{code-cell} ipython3 34 | plt.style.use('default') 35 | plt.plot([1,2,3,4],[2,3,4,5]); 36 | ``` 37 | 38 | 39 | 40 | 41 | 42 | 43 | ```{code-cell} ipython3 44 | plt.style.use('ggplot') 45 | plt.plot([1,2,3,4],[2,3,4,5]); 46 | ``` 47 | 48 | 49 | 50 | 51 | 52 | 53 | 那么matplotlib究竟内置了那些样式供使用呢?总共以下26种丰富的样式可供选择。 54 | 55 | 56 | ```{code-cell} ipython3 57 | print(plt.style.available) 58 | ``` 59 | 60 | 61 | 62 | 63 | ### 2.用户自定义stylesheet 64 | 65 | 在任意路径下创建一个后缀名为mplstyle的样式清单,编辑文件添加以下样式内容 66 | 67 | > axes.titlesize : 24 68 | > axes.labelsize : 20 69 | > lines.linewidth : 3 70 | > lines.markersize : 10 71 | > xtick.labelsize : 16 72 | > ytick.labelsize : 16 73 | 74 | 引用自定义stylesheet后观察图表变化。 75 | 76 | 77 | ```{code-cell} ipython3 78 | plt.style.use('file/presentation.mplstyle') 79 | plt.plot([1,2,3,4],[2,3,4,5]); 80 | ``` 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 值得特别注意的是,matplotlib支持混合样式的引用,只需在引用时输入一个样式列表,若是几个样式中涉及到同一个参数,右边的样式表会覆盖左边的值。 89 | 90 | 91 | ```{code-cell} ipython3 92 | plt.style.use(['dark_background', 'file/presentation.mplstyle']) 93 | plt.plot([1,2,3,4],[2,3,4,5]); 94 | ``` 95 | 96 | 97 | 98 | 99 | 100 | 101 | ### 3.设置rcparams 102 | 103 | 我们还可以通过修改默认rc设置的方式改变样式,所有rc设置都保存在一个叫做 matplotlib.rcParams的变量中。 104 | 修改过后再绘图,可以看到绘图样式发生了变化。 105 | 106 | ```{code-cell} ipython3 107 | plt.style.use('default') # 恢复到默认样式 108 | plt.plot([1,2,3,4],[2,3,4,5]); 109 | ``` 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | ```{code-cell} ipython3 118 | mpl.rcParams['lines.linewidth'] = 2 119 | mpl.rcParams['lines.linestyle'] = '--' 120 | plt.plot([1,2,3,4],[2,3,4,5]); 121 | ``` 122 | 123 | 124 | 125 | 126 | 127 | 128 | 另外matplotlib也还提供了一种更便捷的修改样式方式,可以一次性修改多个样式。 129 | 130 | 131 | ```{code-cell} ipython3 132 | mpl.rc('lines', linewidth=4, linestyle='-.') 133 | plt.plot([1,2,3,4],[2,3,4,5]); 134 | ``` 135 | 136 | 137 | 138 | ## 二、matplotlib的色彩设置(color) 139 | 140 | 在可视化中,如何选择合适的颜色和搭配组合也是需要仔细考虑的,色彩选择要能够反映出可视化图像的主旨。 141 | 从可视化编码的角度对颜色进行分析,可以将颜色分为`色相、亮度和饱和度`三个视觉通道。通常来说: 142 | `色相`: 没有明显的顺序性、一般不用来表达数据量的高低,而是用来表达数据列的类别。 143 | `明度和饱和度`: 在视觉上很容易区分出优先级的高低、被用作表达顺序或者表达数据量视觉通道。 144 | 具体关于色彩理论部分的知识,不属于本教程的重点,请参阅有关拓展材料学习。 145 | [学会这6个可视化配色基本技巧,还原数据本身的意义](https://zhuanlan.zhihu.com/p/88892542) 146 | 147 | 在matplotlib中,设置颜色有以下几种方式: 148 | 149 | ### 1.RGB或RGBA 150 | 151 | 152 | ```{code-cell} ipython3 153 | plt.style.use('default') 154 | ``` 155 | 156 | 157 | ```{code-cell} ipython3 158 | # 颜色用[0,1]之间的浮点数表示,四个分量按顺序分别为(red, green, blue, alpha),其中alpha透明度可省略 159 | plt.plot([1,2,3],[4,5,6],color=(0.1, 0.2, 0.5)) 160 | plt.plot([4,5,6],[1,2,3],color=(0.1, 0.2, 0.5, 0.5)); 161 | ``` 162 | 163 | 164 | 165 | 166 | 167 | 168 | ### 2.HEX RGB 或 RGBA 169 | 170 | 171 | ```{code-cell} ipython3 172 | # 用十六进制颜色码表示,同样最后两位表示透明度,可省略 173 | plt.plot([1,2,3],[4,5,6],color='#0f0f0f') 174 | plt.plot([4,5,6],[1,2,3],color='#0f0f0f80'); 175 | ``` 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | RGB颜色和HEX颜色之间是可以一一对应的,以下网址提供了两种色彩表示方法的转换工具。 184 | [https://www.colorhexa.com/](https://www.colorhexa.com/) 185 | 186 | ### 3.灰度色阶 187 | 188 | 189 | ```{code-cell} ipython3 190 | # 当只有一个位于[0,1]的值时,表示灰度色阶 191 | plt.plot([1,2,3],[4,5,6],color='0.5'); 192 | ``` 193 | 194 | 195 | 196 | 197 | 198 | 199 | ### 4.单字符基本颜色 200 | 201 | 202 | ```{code-cell} ipython3 203 | # matplotlib有八个基本颜色,可以用单字符串来表示,分别是'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w',对应的是blue, green, red, cyan, magenta, yellow, black, and white的英文缩写 204 | plt.plot([1,2,3],[4,5,6],color='m'); 205 | ``` 206 | 207 | 208 | 209 | 210 | 211 | 212 | ### 5.颜色名称 213 | 214 | 215 | ```{code-cell} ipython3 216 | # matplotlib提供了颜色对照表,可供查询颜色对应的名称 217 | plt.plot([1,2,3],[4,5,6],color='tan'); 218 | ``` 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | ![](https://matplotlib.org/3.1.0/_images/sphx_glr_named_colors_002.png) 227 | ![](https://matplotlib.org/3.1.0/_images/sphx_glr_named_colors_003.png) 228 | 229 | ### 6.使用colormap设置一组颜色 230 | 231 | 有些图表支持使用colormap的方式配置一组颜色,从而在可视化中通过色彩的变化表达更多信息。 232 | 233 | 在matplotlib中,colormap共有五种类型: 234 | 235 | - 顺序(Sequential)。通常使用单一色调,逐渐改变亮度和颜色渐渐增加,用于表示有顺序的信息 236 | - 发散(Diverging)。改变两种不同颜色的亮度和饱和度,这些颜色在中间以不饱和的颜色相遇;当绘制的信息具有关键中间值(例如地形)或数据偏离零时,应使用此值。 237 | - 循环(Cyclic)。改变两种不同颜色的亮度,在中间和开始/结束时以不饱和的颜色相遇。用于在端点处环绕的值,例如相角,风向或一天中的时间。 238 | - 定性(Qualitative)。常是杂色,用来表示没有排序或关系的信息。 239 | - 杂色(Miscellaneous)。一些在特定场景使用的杂色组合,如彩虹,海洋,地形等。 240 | 241 | 242 | ```{code-cell} ipython3 243 | x = np.random.randn(50) 244 | y = np.random.randn(50) 245 | plt.scatter(x,y,c=x,cmap='RdPu'); 246 | ``` 247 | 248 | 249 | 在以下官网页面可以查询上述五种colormap的字符串表示和颜色图的对应关系 250 | [https://matplotlib.org/stable/tutorials/colors/colormaps.html](https://matplotlib.org/stable/tutorials/colors/colormaps.html) 251 | 252 | 253 | ## 思考题 254 | - 学习如何自定义colormap,并将其应用到任意一个数据集中,绘制一幅图像,注意colormap的类型要和数据集的特性相匹配,并做简单解释 255 | --------------------------------------------------------------------------------