├── .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 |  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 |  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 |
请思考如何用极坐标系画出类似的玫瑰图
96 |' + _('Hide Search Matches') + '
') 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 | 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 | 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)&&(topOffset181 | 请激活 JavaScript 以开启搜索功能。 182 |
183 |185 | Searching for multiple words only shows matches that contain 186 | all words. 187 |
188 | 193 | 194 |请思考如何用极坐标系画出类似的玫瑰图
96 |