diff --git a/docs/_images/index_11_01.png b/docs/_images/index_11_01.png new file mode 100644 index 0000000..7988fb6 Binary files /dev/null and b/docs/_images/index_11_01.png differ diff --git a/docs/_images/index_12_0.png b/docs/_images/index_12_0.png index 6345502..40c2d16 100644 Binary files a/docs/_images/index_12_0.png and b/docs/_images/index_12_0.png differ diff --git a/docs/_images/index_12_01.png b/docs/_images/index_12_01.png index 6594ae3..93a804f 100644 Binary files a/docs/_images/index_12_01.png and b/docs/_images/index_12_01.png differ diff --git a/docs/_images/index_12_02.png b/docs/_images/index_12_02.png index 4a9e64a..3707f3c 100644 Binary files a/docs/_images/index_12_02.png and b/docs/_images/index_12_02.png differ diff --git a/docs/_images/index_12_03.png b/docs/_images/index_12_03.png new file mode 100644 index 0000000..4a9e64a Binary files /dev/null and b/docs/_images/index_12_03.png differ diff --git a/docs/_images/index_14_01.png b/docs/_images/index_14_01.png index 3ab6ad4..3477292 100644 Binary files a/docs/_images/index_14_01.png and b/docs/_images/index_14_01.png differ diff --git a/docs/_images/index_14_02.png b/docs/_images/index_14_02.png new file mode 100644 index 0000000..475934c Binary files /dev/null and b/docs/_images/index_14_02.png differ diff --git a/docs/_images/index_19_01.png b/docs/_images/index_19_01.png new file mode 100644 index 0000000..fcbc857 Binary files /dev/null and b/docs/_images/index_19_01.png differ diff --git a/docs/_images/index_21_02.png b/docs/_images/index_21_02.png index 29a9b88..7d39af1 100644 Binary files a/docs/_images/index_21_02.png and b/docs/_images/index_21_02.png differ diff --git a/docs/_images/index_21_03.png b/docs/_images/index_21_03.png new file mode 100644 index 0000000..29a9b88 Binary files /dev/null and b/docs/_images/index_21_03.png differ diff --git a/docs/_images/index_23_0.png b/docs/_images/index_23_0.png index 643768c..4ffd57c 100644 Binary files a/docs/_images/index_23_0.png and b/docs/_images/index_23_0.png differ diff --git a/docs/_images/index_23_01.png b/docs/_images/index_23_01.png index 484e934..c5ba250 100644 Binary files a/docs/_images/index_23_01.png and b/docs/_images/index_23_01.png differ diff --git a/docs/_images/index_23_02.png b/docs/_images/index_23_02.png new file mode 100644 index 0000000..484e934 Binary files /dev/null and b/docs/_images/index_23_02.png differ diff --git a/docs/_images/index_25_01.png b/docs/_images/index_25_01.png index 78ce045..11d8154 100644 Binary files a/docs/_images/index_25_01.png and b/docs/_images/index_25_01.png differ diff --git a/docs/_images/index_25_02.png b/docs/_images/index_25_02.png new file mode 100644 index 0000000..78ce045 Binary files /dev/null and b/docs/_images/index_25_02.png differ diff --git a/docs/_images/index_27_0.png b/docs/_images/index_27_0.png index 35d1a0b..7950e97 100644 Binary files a/docs/_images/index_27_0.png and b/docs/_images/index_27_0.png differ diff --git a/docs/_images/index_27_01.png b/docs/_images/index_27_01.png index f5e28df..ff9aaba 100644 Binary files a/docs/_images/index_27_01.png and b/docs/_images/index_27_01.png differ diff --git a/docs/_images/index_27_02.png b/docs/_images/index_27_02.png new file mode 100644 index 0000000..f5e28df Binary files /dev/null and b/docs/_images/index_27_02.png differ diff --git a/docs/_images/index_29_0.png b/docs/_images/index_29_0.png index 2808a1b..5d9fa96 100644 Binary files a/docs/_images/index_29_0.png and b/docs/_images/index_29_0.png differ diff --git a/docs/_images/index_29_01.png b/docs/_images/index_29_01.png new file mode 100644 index 0000000..2808a1b Binary files /dev/null and b/docs/_images/index_29_01.png differ diff --git a/docs/_images/index_30_0.png b/docs/_images/index_30_0.png index 3d3509d..b358c98 100644 Binary files a/docs/_images/index_30_0.png and b/docs/_images/index_30_0.png differ diff --git a/docs/_images/index_39_0.png b/docs/_images/index_39_0.png index 572cf96..5ce8395 100644 Binary files a/docs/_images/index_39_0.png and b/docs/_images/index_39_0.png differ diff --git a/docs/_images/index_3_0.png b/docs/_images/index_3_0.png index 3e7ebc3..97c3304 100644 Binary files a/docs/_images/index_3_0.png and b/docs/_images/index_3_0.png differ diff --git a/docs/_images/index_5_0.png b/docs/_images/index_5_0.png index cd82b44..1992378 100644 Binary files a/docs/_images/index_5_0.png and b/docs/_images/index_5_0.png differ diff --git a/docs/_images/index_7_0.png b/docs/_images/index_7_0.png index 95617c8..8d1d407 100644 Binary files a/docs/_images/index_7_0.png and b/docs/_images/index_7_0.png differ diff --git a/docs/_images/index_7_02.png b/docs/_images/index_7_02.png new file mode 100644 index 0000000..84d3978 Binary files /dev/null and b/docs/_images/index_7_02.png differ diff --git a/docs/_images/index_9_0.png b/docs/_images/index_9_0.png index 77cb83b..39010ce 100644 Binary files a/docs/_images/index_9_0.png and b/docs/_images/index_9_0.png differ diff --git a/docs/_images/index_9_01.png b/docs/_images/index_9_01.png index 1897ec9..86d86f3 100644 Binary files a/docs/_images/index_9_01.png and b/docs/_images/index_9_01.png differ diff --git a/docs/_images/index_9_02.png b/docs/_images/index_9_02.png new file mode 100644 index 0000000..1897ec9 Binary files /dev/null and b/docs/_images/index_9_02.png differ diff --git a/docs/_sources/第五回:样式色彩秀芳华/index.md.txt b/docs/_sources/第五回:样式色彩秀芳华/index.md.txt index 0524854..14f3945 100644 --- a/docs/_sources/第五回:样式色彩秀芳华/index.md.txt +++ b/docs/_sources/第五回:样式色彩秀芳华/index.md.txt @@ -75,7 +75,7 @@ print(plt.style.available) ```{code-cell} ipython3 -plt.style.use('https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/main/file/presentation.mplstyle') +plt.style.use('file/presentation.mplstyle') plt.plot([1,2,3,4],[2,3,4,5]); ``` @@ -89,7 +89,7 @@ plt.plot([1,2,3,4],[2,3,4,5]); ```{code-cell} ipython3 -plt.style.use(['dark_background', 'https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/main/file/presentation.mplstyle']) +plt.style.use(['dark_background', 'file/presentation.mplstyle']) plt.plot([1,2,3,4],[2,3,4,5]); ``` @@ -280,6 +280,6 @@ plt.scatter(x,y,c=x,cmap='RdPu'); ## 参考资料 -[1.matplotlib官网样式使用指南](https://matplotlib.org/stable/tutorials/introductory/customizing.html?highlight=rcparams) +[1.matplotlib官网样式使用指南](https://matplotlib.org/stable/tutorials/introductory/customizing.html?highlight=rcparams) [2.matplotlib官网色彩使用指南](https://matplotlib.org/stable/tutorials/colors/colors.html#sphx-glr-tutorials-colors-colors-py) diff --git a/docs/doctrees/environment.pickle b/docs/doctrees/environment.pickle index f2fbe42..492942a 100644 Binary files a/docs/doctrees/environment.pickle and b/docs/doctrees/environment.pickle differ diff --git a/docs/doctrees/第三回:布局格式定方圆/index.doctree b/docs/doctrees/第三回:布局格式定方圆/index.doctree index 51295c5..50c022f 100644 Binary files a/docs/doctrees/第三回:布局格式定方圆/index.doctree and b/docs/doctrees/第三回:布局格式定方圆/index.doctree differ diff --git a/docs/doctrees/第二回:艺术画笔见乾坤/index.doctree b/docs/doctrees/第二回:艺术画笔见乾坤/index.doctree index 0e70697..83830d0 100644 Binary files a/docs/doctrees/第二回:艺术画笔见乾坤/index.doctree and b/docs/doctrees/第二回:艺术画笔见乾坤/index.doctree differ diff --git a/docs/doctrees/第五回:样式色彩秀芳华/index.doctree b/docs/doctrees/第五回:样式色彩秀芳华/index.doctree index a51765d..4117497 100644 Binary files a/docs/doctrees/第五回:样式色彩秀芳华/index.doctree and b/docs/doctrees/第五回:样式色彩秀芳华/index.doctree differ diff --git a/docs/doctrees/第四回:文字图例尽眉目/index.doctree b/docs/doctrees/第四回:文字图例尽眉目/index.doctree index 84b2ecb..961a2ca 100644 Binary files a/docs/doctrees/第四回:文字图例尽眉目/index.doctree and b/docs/doctrees/第四回:文字图例尽眉目/index.doctree differ diff --git a/docs/searchindex.js b/docs/searchindex.js index 5822bb4..e76908f 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +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:{"01":[3,5],"03":2,"05":[2,3],"0f0f0f":4,"0f0f0f80":4,"0x23155916dc0":1,"10":[2,3,4,5],"100":[1,3,5],"1000":[2,3,5],"1007":4,"1008":4,"1009":4,"101":3,"11004":4,"111":[3,5],"114":4,"115":4,"116":4,"117":4,"118":4,"119":4,"120":4,"1247":4,"1248":4,"1249":4,"125":3,"1252":4,"1253":4,"1254":4,"1298":4,"1299":4,"1300":4,"1345":4,"1346":4,"1347":4,"1348":4,"1349":4,"1350":4,"1388":4,"1389":4,"1390":4,"14":5,"1414":4,"1415":4,"1416":4,"15":[3,5],"150":2,"16":[2,3,4,5],"162":3,"17":[3,5],"1f":[3,5],"20":[2,3,4,5],"200":2,"2017":5,"21":5,"211":3,"213":4,"214":4,"215":4,"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,"493":4,"494":4,"495":4,"50":[4,5],"516":4,"517":4,"518":4,"533":4,"534":4,"535":4,"536818":3,"54":3,"5f":5,"65":5,"697":4,"698":4,"699":4,"70":[2,5],"726":4,"727":4,"728":4,"75":2,"775x0":3,"797":4,"798":4,"799":4,"821":4,"822":4,"823":4,"85":5,"8ce8ec49641":4,"90":[3,5],"918":4,"919":4,"920":4,"947":4,"948":4,"949":4,"95":[3,5],"952":4,"953":4,"954":4,"class":3,"default":[3,4,5],"float":5,"for":[2,3,4,5],"if":[2,4,5],"import":[1,2,3,4,5],"in":[2,3,4,5],"int":[3,5],"new":5,"return":[4,5],"super":4,"true":[2,3,5],"try":4,"with":[4,5],__enter__:4,__init__:4,_apply_styl:4,_buffer:4,_call_chain:4,_check_hostnam:4,_classic_test_patch:4,_context:4,_create_connect:4,_encod:4,_open:4,_open_file_or_url:4,_rc_params_in_fil:4,_send_output:4,_send_request:4,_socket:4,abcd:2,abov:4,add:3,add_artist:5,add_ax:3,add_collect:3,add_gridspec:2,add_lin:3,add_patch:3,add_subplot:[2,3,5],address:4,addrlist:4,af:4,ai:3,align:3,all:3,alpha:[2,3,4,5],alpha_i:5,an:5,anchor:2,and:4,angl:3,annot:2,anoth:4,antialias:3,api:5,appdata:4,arang:[3,5],area:2,arg:[3,4],arrai:3,arrow:2,arrowprop:2,artist:5,as:[1,2,3,4,5],ascend:3,aspect:3,ast_node_interact:3,astyp:3,at:1,audit:4,auto_open:4,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:[2,3],barh:2,barsabov:3,barstack:3,base:5,baselin:5,bbox:5,bessel:3,best:[2,5],beta_i:5,bicub:3,bilinear:3,bin:3,black:[2,4,5],block:5,blue:[2,3,4,5],bmh:4,bodi:4,bold:5,book:5,bool:3,both:[3,5],bottom:[3,5],box:5,bright:4,by:5,bymonthdai:5,cadefault:4,cafil:4,calibri:5,call:4,cannotsendhead:4,canonnam:4,canva:3,capath:4,capsiz:3,capstyl:3,capthick:3,catrom:3,caus:4,center:[2,3,5],center_baselin:5,ch:5,chain:4,check_hostnam:4,china:5,circl:3,circlecollect:3,classic:4,client:4,close:3,cmap:[2,3,4],co:3,code:2,color:[0,2,3,5],colorblind10:4,colorblind:4,colorhexa:4,column:3,com:4,complet:4,condens:5,config_from_fil:4,connect:4,contain:[0,1],context:4,contextlib:4,coord:5,core:[3,4],cos:5,count:3,counterclock:3,create_connect:4,cubic:1,current:[3,5],cursiv:5,cut:3,cyan:4,cyclic:4,dai:5,damp:5,dark:4,dark_background:4,darkgrid:4,dash_capstyl:3,dash_joinstyl:3,data:[3,4,5],data_interv:3,datafram:3,datawhalechina:4,date:5,dateformatt:5,datetim:5,dayloc:5,decod:4,deep:4,def:[4,5],dejavu:5,del:4,delax:3,demi:5,demibold:5,demo:4,densiti:3,descript:5,df:3,df_cnt:3,dict:[2,5],direct:4,displai:5,diverg:4,do_open:4,dog:3,down:5,drawn:3,drawstyl:3,drop:3,dure:4,echart:4,ecolor:3,edgecolor:[2,3,5],elinewidth:3,els:[2,4,5],encod:4,encode_chunk:4,endhead:4,ensur:3,entri:5,enumer:5,equal:3,equat:5,err:4,errno:4,error:[3,4],errorbar:3,erroreveri:3,except:4,exp:5,expand:5,explod:3,extent:3,extra:5,facecolor:[2,3,5],fail:4,fail_on_error:4,fals:[2,3,4,5],famili:[4,5],fancybboxpatch:5,fantasi:5,fantast:4,fast:4,fd:4,fenzu:3,festk:5,fig1:3,fig:[1,2,3,5],figsiz:[2,3,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,flag:4,flat:[3,5],fmt:3,fname:[4,5],follow:4,font1:5,font2:5,font3:5,font4:5,font:[2,5],font_famili:5,font_manag:5,font_manager_api:5,font_name_list:5,font_properti:5,fontdict:5,fontfamili:5,fontmanag:5,fontmg:5,fontnam:5,fontproperti:5,fontsiz:[2,5],fontstretch:5,fontstyl:5,fontweight:5,format:5,formatoddtick:5,formatstrformatt:[3,5],formatt:3,found:4,four:5,frame:3,frameon:5,frog:3,from:[3,5],fuchsia:3,full:3,full_url:4,fullurl:4,func:4,funcformatt:5,gaierror:4,gaussian:3,gca:5,gcf:5,gen:4,get:5,get_data_interv:3,get_method:4,get_ticklabel:3,get_ticklin:[3,5],get_tickloc:3,get_view_interv:3,getaddrinfo:4,getattr:4,getrespons:4,ggplot:4,githubusercont:4,grayscal:4,green:[2,3,4,5],grid:[2,3],gridlin:3,ha:5,ham:3,han:3,handl:[4,5],handle_open:4,handler:4,has_head:4,hatch:3,head_length:2,head_width:2,header:4,heavi:5,height:3,height_ratio:2,hermit:3,hist:[2,3],histtyp:3,hog:3,horizont:5,horizontalalign:5,host:4,hsv:2,html:[4,5],http:[4,5],http_class:4,http_conn_arg:4,https_open:4,httpsconnect:4,imlim:3,imshow:3,include_lowest:3,index:3,indexloc:5,infti:5,inplac:3,input:4,institut:5,interactiveshel:3,interp_method:3,interpol:3,ioerror:4,ipython:[1,3,4],is:[3,4],ital:5,joinstyl:3,jupyt:1,kaiser:3,kei:5,kind:4,kwarg:[3,5],l1:5,label1:[3,5],label2:3,label:[1,2,3,5],labelcolor:3,labeldist:3,labelleft:3,labelpad:5,labelright:3,labels:4,lambda:3,lanczo:3,larg:5,last:4,latex:5,left:[2,3,5],legend:[0,1,2,3],len:[3,5],lib:4,librari:4,light:5,lightgoldenrodyellow:3,lightslategrai:3,limit:3,line1:2,line2d:[1,5],line:[1,4,5],line_down:5,line_up:5,linear:[1,3],linearloc:5,linespac:5,linestyl:[3,4,5],linewidth:[3,4,5],linspac:[1,3,5],list:[2,4,5],loc:[2,3,5],local:4,locat:3,log:[2,3],lolim:3,lower:[2,5],lw:3,magenta:4,main:4,major:3,map:3,markdown:5,marker:[3,5],markeredgecolor:3,markeredgewidth:3,markerfacecolor:3,markerfacecoloralt:3,markers:[3,4],markeveri:3,mathcal:5,mathrm:5,mathtext:5,matlab:1,matplotlib:[0,2,5],matplotlib_fnam:4,max:3,maxi:3,maxnloc:5,mc:5,mdate:5,medium:5,message_bodi:4,meth_nam:4,method:[3,4],microsoft:5,mid:3,min:3,mini:3,minor:3,miscellan:4,mitchel:3,modul:4,mono:5,monospac:5,most:4,mpl:4,mplstyle:4,msg:4,multipl:5,multipleloc:5,mute:4,mv:5,my_font1:5,my_font2:5,name:5,navi:5,nbin:5,ncol:[2,3],nearest:3,new_ticks1:5,next:4,none:[3,4,5],norm:3,normal:[3,5],not:4,notebook:[1,4],np:[1,2,3,4,5],nrow:[2,3],number:5,numer:5,numpi:[1,2,3,4,5],numtick:5,object:[0,1,5],obliqu:5,occur:4,odd:5,of:[4,5],offset:5,omega:5,one:[3,5],oo:[1,5],open:4,or:[4,5],org:[4,5],orient:[1,5],origin:3,oscil:5,oserror:4,p1:5,p2:5,p3:5,p4:5,packag:4,pad:5,palett:4,panda:[1,2,3],paper:4,pastel:4,patch:5,patchcollect:3,path:[4,5],pathcollect:3,pathlib:5,pattern:5,pctdistanc:3,pd:[2,3],person:4,pi:[2,3,5],pickradiu:3,pie:[2,3],plot:[1,2,3,4,5],plotnonfinit:3,plt:[1,3,4,5],polar:2,port:4,pos:5,posit:5,poster:4,present:4,primit:0,print:[3,4,5],program:4,project:2,prop:5,properti:5,proto:4,protocol:4,purpl:5,py:4,pycharmproject:4,pyplot:[1,2,3,4,5],python39:4,python:[1,4],quadrat:1,quadric:3,qualit:4,radiu:3,rais:4,rand:[2,3],randint:3,randn:[2,4],random:[2,3,4,5],rang:[2,3,5],ratio:3,raw:4,rc:4,rc_params_from_fil:4,rc_temp:4,rcparam:[2,5],rdpu:4,re:3,recent:4,rect:3,red:[2,3,4,5],regular:5,regularpolycollect:3,render:3,req:4,request:4,res:4,resampl:3,reset_index:3,respons:4,result:4,right:[2,3,5],ring:3,roman:5,rotat:[2,5],rotatelabel:3,rotation_mod:2,row:3,rperphysik:5,sa:4,san:[2,5],scatter:[2,3,4,5],scatterpoint:5,score:3,seaborn:[1,4],sector:3,see:4,selector:4,self:[3,4,5],semi:5,semibold:5,send:4,sequenti:4,serif:[2,5],server:4,set:4,set_antialias:3,set_arrai:3,set_color:[3,5],set_facecolor:3,set_famili:5,set_fonts:3,set_major_formatt:[3,5],set_major_loc:5,set_markeredgewidth:3,set_markers:3,set_minor_formatt:5,set_minor_loc:5,set_nam:5,set_posit:5,set_rot:3,set_styl:5,set_tick:5,set_tick_param:3,set_ticklabel:5,set_ticks_posit:5,set_titl:[1,2,3],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,set_ytick:5,set_yticklabel:5,setp:3,shadow:3,shape:3,sharei:2,sharex:2,shell:1,show:[1,3,5],shu:5,simhei:[2,5],simkai:5,simpl:1,simsun:5,sin:[3,5],sinc:3,site:4,six:5,size:[2,3,5],skywat:4,small:5,sock:4,sock_stream:4,socket:4,socktyp:4,solarize_light2:4,solid_capstyl:3,solid_joinstyl:3,sort_valu:3,source_address:4,spec:2,specifi:4,spine:5,spline16:3,spline36:3,ssl_ctx:4,stabl:4,stack:3,startangl:3,step:3,stepfil:3,stixgener:5,stixsizefoursym:5,stixsizeonesym:5,stopiter:4,str:[3,5],stretch:5,string:2,strmethodformatt:5,style:[0,1,5],sub1:2,sub2:2,sub3:2,sub4:2,sub5:2,subplot:[1,3,5],subplot_kw:3,subplots_adjust:5,sum:3,sum_:5,suptitl:2,sys:4,tableau:4,talk:4,tan:4,text:[2,3],textprop:3,that:3,the:[3,4],theta1:3,theta2:3,theta:2,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,timeout:4,titl:1,titlecolor:5,titles:[4,5],titleweight:5,to:4,top:5,traceback:4,transax:5,transfer:4,transform:[4,5],trick:1,truetyp:5,ttf:5,ttflist:5,tupl:3,tutori:4,two:[3,5],type:4,ultra:5,ultralight:5,unicod:5,unicode_minu:[2,5],uniform:5,up:5,uplim:3,upper:[2,5],url:[3,4],urlerror:4,urllib:4,urlopen:4,us:5,use:4,use_default_templ:4,user:4,utf:4,va:5,valid:4,valu:5,value_count:3,vert:3,vertic:5,verticalalign:5,view_interv:3,viridi:3,vmax:3,vmin:3,volt:5,voltag:5,vs:5,was:4,web:1,wedgeprop:3,weight:5,which:3,white:4,whitegrid:4,width:3,width_ratio:2,window:[1,5],www:4,x1:5,x_i:5,x_label:5,xaxi:[3,5],xdata:3,xerr:3,xlabel:[1,3],xlim:[3,5],xlolim:3,xscal:3,xtick:[3,4,5],xuplim:3,xx:5,xy:[2,3,5],xytext:2,y1:[3,5],y2:[3,5],y_label:5,yahei:5,yaxi:[3,5],ydata:3,yellow:[2,3,4],yerr:3,yield:4,ylabel:[1,3],ylim:5,ytick:[3,4,5],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,api:3,artist:3,axes:[3,5],axi:3,collect:3,color:4,colormap:4,contain:3,content:0,figtext:5,figur:[1,3,5],formatt:5,gridspec:2,hex:4,imag:3,legend:5,line2d:3,line:3,locat:5,matplotlib:[1,3,4],matplotlibrc:4,object:3,patch:3,plt:2,polygon:3,primit:3,rcparam:4,rectangl:3,rgb:4,rgba:4,set_titl:5,style:4,stylesheet:4,subplot:2,suptitl:5,text:5,tick:[3,5],titl:5,wedg:3,xlabel:5,ylabel:5}}) \ No newline at end of file +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:{"01":[3,5],"03":2,"05":[2,3],"0f0f0f":4,"0f0f0f80":4,"0x23155916dc0":1,"10":[2,3,4,5],"100":[1,3,5],"1000":[2,3,5],"101":3,"111":[3,5],"125":3,"14":5,"15":[3,5],"150":2,"16":[2,3,4,5],"162":3,"17":[3,5],"1f":[3,5],"20":[2,3,4,5],"200":2,"2017":5,"21":5,"211":3,"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,5],"536818":3,"54":3,"5f":5,"65":5,"70":[2,5],"75":2,"775x0":3,"85":5,"90":[3,5],"95":[3,5],"class":3,"default":[3,4,5],"float":5,"for":[2,3,5],"if":[2,5],"import":[1,2,3,4,5],"in":[2,3,5],"int":[3,5],"new":5,"return":5,"true":[2,3,5],"with":5,_classic_test_patch:4,abcd:2,add:3,add_artist:5,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],alpha_i:5,an:5,anchor:2,and:4,angl:3,annot:2,antialias:3,api:5,arang:[3,5],area:2,arg:3,arrai:3,arrow:2,arrowprop:2,artist:5,as:[1,2,3,4,5],ascend:3,aspect:3,ast_node_interact:3,astyp:3,at:1,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:[2,3],barh:2,barsabov:3,barstack:3,base:5,baselin:5,bbox:5,bessel:3,best:[2,5],beta_i:5,bicub:3,bilinear:3,bin:3,black:[2,4,5],block:5,blue:[2,3,4,5],bmh:4,bold:5,book:5,bool:3,both:[3,5],bottom:[3,5],box:5,bright:4,by:5,bymonthdai:5,calibri:5,canva:3,capsiz:3,capstyl:3,capthick:3,catrom:3,center:[2,3,5],center_baselin:5,ch:5,china:5,circl:3,circlecollect:3,classic:4,close:3,cmap:[2,3,4],co:3,code:2,color:[0,2,3,5],colorblind10:4,colorblind:4,colorhexa:4,column:3,com:4,condens:5,contain:[0,1],coord:5,core:3,cos:5,count:3,counterclock:3,cubic:1,current:[3,5],cursiv:5,cut:3,cyan:4,cyclic:4,dai:5,damp:5,dark:4,dark_background:4,darkgrid:4,dash_capstyl:3,dash_joinstyl:3,data:[3,4,5],data_interv:3,datafram:3,date:5,dateformatt:5,datetim:5,dayloc:5,deep:4,def:5,dejavu:5,delax:3,demi:5,demibold:5,demo:4,densiti:3,descript:5,df:3,df_cnt:3,dict:[2,5],displai:5,diverg:4,dog:3,down:5,drawn:3,drawstyl:3,drop:3,echart:4,ecolor:3,edgecolor:[2,3,5],elinewidth:3,els:[2,5],ensur:3,entri:5,enumer:5,equal:3,equat:5,error:3,errorbar:3,erroreveri:3,exp:5,expand:5,explod:3,extent:3,extra:5,facecolor:[2,3,5],fals:[2,3,5],famili:5,fancybboxpatch:5,fantasi:5,fast:4,fenzu:3,festk:5,fig1:3,fig:[1,2,3,5],figsiz:[2,3,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,fname:5,font1:5,font2:5,font3:5,font4:5,font:[2,5],font_famili:5,font_manag:5,font_manager_api:5,font_name_list:5,font_properti:5,fontdict:5,fontfamili:5,fontmanag:5,fontmg:5,fontnam:5,fontproperti:5,fontsiz:[2,5],fontstretch:5,fontstyl:5,fontweight:5,format:5,formatoddtick:5,formatstrformatt:[3,5],formatt:3,four:5,frame:3,frameon:5,frog:3,from:[3,5],fuchsia:3,full:3,funcformatt:5,gaussian:3,gca:5,gcf:5,get:5,get_data_interv:3,get_ticklabel:3,get_ticklin:[3,5],get_tickloc:3,get_view_interv:3,ggplot:4,grayscal:4,green:[2,3,4,5],grid:[2,3],gridlin:3,ha:5,ham:3,han:3,handl:5,hatch:3,head_length:2,head_width:2,heavi:5,height:3,height_ratio:2,hermit:3,hist:[2,3],histtyp:3,hog:3,horizont:5,horizontalalign:5,hsv:2,html:[4,5],http:[4,5],imlim:3,imshow:3,include_lowest:3,index:3,indexloc:5,infti:5,inplac:3,institut:5,interactiveshel:3,interp_method:3,interpol:3,ipython:[1,3],is:3,ital:5,joinstyl:3,jupyt:1,kaiser:3,kei:5,kwarg:[3,5],l1:5,label1:[3,5],label2:3,label:[1,2,3,5],labelcolor:3,labeldist:3,labelleft:3,labelpad:5,labelright:3,labels:4,lambda:3,lanczo:3,larg:5,latex:5,left:[2,3,5],legend:[0,1,2,3],len:[3,5],lib:4,light:5,lightgoldenrodyellow:3,lightslategrai:3,limit:3,line1:2,line2d:[1,5],line:[1,4,5],line_down:5,line_up:5,linear:[1,3],linearloc:5,linespac:5,linestyl:[3,4,5],linewidth:[3,4,5],linspac:[1,3,5],list:[2,5],loc:[2,3,5],locat:3,log:[2,3],lolim:3,lower:[2,5],lw:3,magenta:4,major:3,map:3,markdown:5,marker:[3,5],markeredgecolor:3,markeredgewidth:3,markerfacecolor:3,markerfacecoloralt:3,markers:[3,4],markeveri:3,mathcal:5,mathrm:5,mathtext:5,matlab:1,matplotlib:[0,2,5],matplotlib_fnam:4,max:3,maxi:3,maxnloc:5,mc:5,mdate:5,medium:5,method:3,microsoft:5,mid:3,min:3,mini:3,minor:3,miscellan:4,mitchel:3,mono:5,monospac:5,mpl:4,mplstyle:4,multipl:5,multipleloc:5,mute:4,mv:5,my_font1:5,my_font2:5,name:5,navi:5,nbin:5,ncol:[2,3],nearest:3,new_ticks1:5,none:[3,5],norm:3,normal:[3,5],notebook:[1,4],np:[1,2,3,4,5],nrow:[2,3],number:5,numer:5,numpi:[1,2,3,4,5],numtick:5,object:[0,1,5],obliqu:5,odd:5,of:5,offset:5,omega:5,one:[3,5],oo:[1,5],or:5,org:[4,5],orient:[1,5],origin:3,oscil:5,p1:5,p2:5,p3:5,p4:5,packag:4,pad:5,palett:4,panda:[1,2,3],paper:4,pastel:4,patch:5,patchcollect:3,path:5,pathcollect:3,pathlib:5,pattern:5,pctdistanc:3,pd:[2,3],person:4,pi:[2,3,5],pickradiu:3,pie:[2,3],plot:[1,2,3,4,5],plotnonfinit:3,plt:[1,3,4,5],polar:2,pos:5,posit:5,poster:4,present:4,primit:0,print:[3,4,5],project:2,prop:5,properti:5,purpl:5,pycharmproject:4,pyplot:[1,2,3,4,5],python:[1,4],quadrat:1,quadric:3,qualit:4,radiu:3,rand:[2,3],randint:3,randn:[2,4],random:[2,3,4,5],rang:[2,3,5],ratio:3,rc:4,rcparam:[2,5],rdpu:4,re:3,rect:3,red:[2,3,4,5],regular:5,regularpolycollect:3,render:3,resampl:3,reset_index:3,right:[2,3,5],ring:3,roman:5,rotat:[2,5],rotatelabel:3,rotation_mod:2,row:3,rperphysik:5,san:[2,5],scatter:[2,3,4,5],scatterpoint:5,score:3,seaborn:[1,4],sector:3,self:[3,5],semi:5,semibold:5,sequenti:4,serif:[2,5],set:4,set_antialias:3,set_arrai:3,set_color:[3,5],set_facecolor:3,set_famili:5,set_fonts:3,set_major_formatt:[3,5],set_major_loc:5,set_markeredgewidth:3,set_markers:3,set_minor_formatt:5,set_minor_loc:5,set_nam:5,set_posit:5,set_rot:3,set_styl:5,set_tick:5,set_tick_param:3,set_ticklabel:5,set_ticks_posit:5,set_titl:[1,2,3],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,set_ytick:5,set_yticklabel:5,setp:3,shadow:3,shape:3,sharei:2,sharex:2,shell:1,show:[1,3,5],shu:5,simhei:[2,5],simkai:5,simpl:1,simsun:5,sin:[3,5],sinc:3,site:4,six:5,size:[2,3,5],skywat:4,small:5,solarize_light2:4,solid_capstyl:3,solid_joinstyl:3,sort_valu:3,spec:2,spine:5,spline16:3,spline36:3,stabl:4,stack:3,startangl:3,step:3,stepfil:3,stixgener:5,stixsizefoursym:5,stixsizeonesym:5,str:[3,5],stretch:5,string:2,strmethodformatt:5,style:[0,1,5],sub1:2,sub2:2,sub3:2,sub4:2,sub5:2,subplot:[1,3,5],subplot_kw:3,subplots_adjust:5,sum:3,sum_:5,suptitl:2,tableau:4,talk:4,tan:4,text:[2,3],textprop:3,that:3,the:3,theta1:3,theta2:3,theta:2,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,titlecolor:5,titles:[4,5],titleweight:5,top:5,transax:5,transform:5,trick:1,truetyp:5,ttf:5,ttflist:5,tupl:3,tutori:4,two:[3,5],ultra:5,ultralight:5,unicod:5,unicode_minu:[2,5],uniform:5,up:5,uplim:3,upper:[2,5],url:3,us:5,use:4,user:4,va:5,valu:5,value_count:3,vert:3,vertic:5,verticalalign:5,view_interv:3,viridi:3,vmax:3,vmin:3,volt:5,voltag:5,vs:5,web:1,wedgeprop:3,weight:5,which:3,white:4,whitegrid:4,width:3,width_ratio:2,window:[1,5],www:4,x1:5,x_i:5,x_label:5,xaxi:[3,5],xdata:3,xerr:3,xlabel:[1,3],xlim:[3,5],xlolim:3,xscal:3,xtick:[3,4,5],xuplim:3,xx:5,xy:[2,3,5],xytext:2,y1:[3,5],y2:[3,5],y_label:5,yahei:5,yaxi:[3,5],ydata:3,yellow:[2,3,4],yerr:3,ylabel:[1,3],ylim:5,ytick:[3,4,5],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,api:3,artist:3,axes:[3,5],axi:3,collect:3,color:4,colormap:4,contain:3,content:0,figtext:5,figur:[1,3,5],formatt:5,gridspec:2,hex:4,imag:3,legend:5,line2d:3,line:3,locat:5,matplotlib:[1,3,4],matplotlibrc:4,object:3,patch:3,plt:2,polygon:3,primit:3,rcparam:4,rectangl:3,rgb:4,rgba:4,set_titl:5,style:4,stylesheet:4,subplot:2,suptitl:5,text:5,tick:[3,5],titl:5,wedg:3,xlabel:5,ylabel:5}}) \ No newline at end of file diff --git a/docs/第五回:样式色彩秀芳华/index.html b/docs/第五回:样式色彩秀芳华/index.html index 41e54aa..ea9c331 100644 --- a/docs/第五回:样式色彩秀芳华/index.html +++ b/docs/第五回:样式色彩秀芳华/index.html @@ -336,153 +336,26 @@ ytick.labelsize : 16
引用自定义stylesheet后观察图表变化。
plt.style.use('https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/main/file/presentation.mplstyle')
+plt.style.use('file/presentation.mplstyle')
plt.plot([1,2,3,4],[2,3,4,5]);
---------------------------------------------------------------------------
-gaierror Traceback (most recent call last)
-~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
- 1345 try:
--> 1346 h.request(req.get_method(), req.selector, req.data, headers,
- 1347 encode_chunked=req.has_header('Transfer-encoding'))
-
-~\AppData\Local\Programs\Python\Python39\lib\http\client.py in request(self, method, url, body, headers, encode_chunked)
- 1252 """Send a complete request to the server."""
--> 1253 self._send_request(method, url, body, headers, encode_chunked)
- 1254
-
-~\AppData\Local\Programs\Python\Python39\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked)
- 1298 body = _encode(body, 'body')
--> 1299 self.endheaders(body, encode_chunked=encode_chunked)
- 1300
-
-~\AppData\Local\Programs\Python\Python39\lib\http\client.py in endheaders(self, message_body, encode_chunked)
- 1247 raise CannotSendHeader()
--> 1248 self._send_output(message_body, encode_chunked=encode_chunked)
- 1249
-
-~\AppData\Local\Programs\Python\Python39\lib\http\client.py in _send_output(self, message_body, encode_chunked)
- 1007 del self._buffer[:]
--> 1008 self.send(msg)
- 1009
-
-~\AppData\Local\Programs\Python\Python39\lib\http\client.py in send(self, data)
- 947 if self.auto_open:
---> 948 self.connect()
- 949 else:
-
-~\AppData\Local\Programs\Python\Python39\lib\http\client.py in connect(self)
- 1414
--> 1415 super().connect()
- 1416
-
-~\AppData\Local\Programs\Python\Python39\lib\http\client.py in connect(self)
- 918 """Connect to the host and port specified in __init__."""
---> 919 self.sock = self._create_connection(
- 920 (self.host,self.port), self.timeout, self.source_address)
-
-~\AppData\Local\Programs\Python\Python39\lib\socket.py in create_connection(address, timeout, source_address)
- 821 err = None
---> 822 for res in getaddrinfo(host, port, 0, SOCK_STREAM):
- 823 af, socktype, proto, canonname, sa = res
-
-~\AppData\Local\Programs\Python\Python39\lib\socket.py in getaddrinfo(host, port, family, type, proto, flags)
- 952 addrlist = []
---> 953 for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
- 954 af, socktype, proto, canonname, sa = res
-
-gaierror: [Errno 11004] getaddrinfo failed
-
-During handling of the above exception, another exception occurred:
-
-URLError Traceback (most recent call last)
-c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\matplotlib\style\core.py in use(style)
- 114 try:
---> 115 rc = rc_params_from_file(style, use_default_template=False)
- 116 _apply_style(rc)
-
-c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\matplotlib\__init__.py in rc_params_from_file(fname, fail_on_error, use_default_template)
- 797 """
---> 798 config_from_file = _rc_params_in_file(fname, fail_on_error=fail_on_error)
- 799
-
-c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\matplotlib\__init__.py in _rc_params_in_file(fname, transform, fail_on_error)
- 726 rc_temp = {}
---> 727 with _open_file_or_url(fname) as fd:
- 728 try:
-
-~\AppData\Local\Programs\Python\Python39\lib\contextlib.py in __enter__(self)
- 116 try:
---> 117 return next(self.gen)
- 118 except StopIteration:
-
-c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\matplotlib\__init__.py in _open_file_or_url(fname)
- 697 )
---> 698 with urllib.request.urlopen(fname, context=ssl_ctx) as f:
- 699 yield (line.decode('utf-8') for line in f)
-
-~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
- 213 opener = _opener
---> 214 return opener.open(url, data, timeout)
- 215
-
-~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in open(self, fullurl, data, timeout)
- 516 sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method())
---> 517 response = self._open(req, data)
- 518
-
-~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in _open(self, req, data)
- 533 protocol = req.type
---> 534 result = self._call_chain(self.handle_open, protocol, protocol +
- 535 '_open', req)
-
-~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args)
- 493 func = getattr(handler, meth_name)
---> 494 result = func(*args)
- 495 if result is not None:
-
-~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in https_open(self, req)
- 1388 def https_open(self, req):
--> 1389 return self.do_open(http.client.HTTPSConnection, req,
- 1390 context=self._context, check_hostname=self._check_hostname)
-
-~\AppData\Local\Programs\Python\Python39\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
- 1348 except OSError as err: # timeout error
--> 1349 raise URLError(err)
- 1350 r = h.getresponse()
-
-URLError: <urlopen error [Errno 11004] getaddrinfo failed>
-
-The above exception was the direct cause of the following exception:
-
-OSError Traceback (most recent call last)
-<ipython-input-5-8ce8ec49641e> in <module>
-----> 1 plt.style.use('https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/main/file/presentation.mplstyle')
- 2 plt.plot([1,2,3,4],[2,3,4,5]);
-
-c:\users\skywater\pycharmprojects\personal\demo\lib\site-packages\matplotlib\style\core.py in use(style)
- 116 _apply_style(rc)
- 117 except IOError as err:
---> 118 raise IOError(
- 119 "{!r} not found in the style library and input is not a "
- 120 "valid URL or path; see `style.available` for list of "
-
-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
-
值得特别注意的是,matplotlib支持混合样式的引用,只需在引用时输入一个样式列表,若是几个样式中涉及到同一个参数,右边的样式表会覆盖左边的值。
plt.style.use(['dark_background', 'https://raw.githubusercontent.com/datawhalechina/fantastic-matplotlib/main/file/presentation.mplstyle'])
+plt.style.use(['dark_background', 'file/presentation.mplstyle'])
plt.plot([1,2,3,4],[2,3,4,5]);
另外matplotlib也还提供了了一种更便捷的修改样式方式,可以一次性修改多个样式。
'c:\\users\\skywater\\pycharmprojects\\personal\\demo\\lib\\site-packages\\matplotlib\\mpl-data\\matplotlibrc'
+
找到路径后,就可以直接编辑样式文件了,打开后看到的文件格式大致是这样的,文件中列举了所有的样式参数,找到想要修改的参数,比如lines.linewidth: 8,并将前面的注释符号去掉,此时再绘图发现样式以及生效了。
RGB颜色和HEX颜色之间是可以一一对应的,以下网址提供了两种色彩表示方法的转换工具。
https://www.colorhexa.com/
在以下官网页面可以查询上述五种colormap的字符串表示和颜色图的对应关系
https://matplotlib.org/stable/tutorials/colors/colormaps.html
此外matplotlib.dates
模块还提供了特殊的设置日期型刻度格式和位置的方式
其他进阶案例
@@ -941,7 +941,7 @@ locator=plt.LinearLocator(numticks=5)#线性划分5等分,4个刻度