datawhalechina / fantastic-matplotlib Goto Github PK
View Code? Open in Web Editor NEWMatplotlib中文教程,在线阅读地址:https://datawhalechina.github.io/fantastic-matplotlib/
License: Other
Matplotlib中文教程,在线阅读地址:https://datawhalechina.github.io/fantastic-matplotlib/
License: Other
【1】坐标:二.Tick上的文本--b) Tick Locators
问题:对locator=plt.MaxNLocator(nbins=7)的解释没有,建议加上对plt.MaxNLocator(nbins=m)的解释,“选择合适的位置并不超过m个间隔”。在下面的例子中,建议把nbins=10改为nbins=3,这样对比其他locator的效果会更清晰一点。
【2】坐标:二.Tick上的文本--matplotlib.dates 模块
问题:没有写明导入mdates和datetime模块,个人认为对新手不是很友好,特别是mdates这种被as过的。建议加上
import matplotlib.dates as mdates
import datetime
1.在第二章中2.Patch下的2) bar-柱状图部分:
有一行代码是:
plt.bar(np.arange(16), y, alpha=0.5, width=0.5, color='yellow', edgecolor='red', label='The First Bar', lw=3);
可以看到这里设置了label为The First Bar,如果直接运行原代码是不会有label显示的,需在最后加上一句plt.legend()
2.针对1. 2DLines下,2) errorbar绘制误差折线图的部分,在plt.errorbar()有很多可以设置的参数,这里笔者可以在基础代码上加上一些参数的设置,可以让例子更生动,比如:
plt.errorbar(x,y+3,yerr=yerr,fmt='o',ecolor='r',color='b',elinewidth=2,capsize=4);
plt.errorbar(x,y,yerr=error_range,fmt='o:',ecolor='hotpink',elinewidth=3,ms=5,mfc='salmon',capsize=3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.