python的画图库是什么齐全,我们可以借助python,来画出很多好看的图形。而matplotlib是一个画图的库,这一节将介绍matplolib.pyplot。
导入的方式为: import matplotlib.pyplot as plt
下表为常见的函数,具体参数有机会下次写。
将color、linetyle、color 记为 **kwargs
可以使用字符来表示线型、线宽、颜色等
label:设置图例
axis:表方向
zorder:设置顺序
s:点的大小
c:颜色
labels:饼图标签
explode:距中心距离
autopct:控制输出
使用matplotlib 的最大好处就是有现成的模板。
函数:plt.style.use('grayscale') 还有:['bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'seaborn-bright', 'seaborn-colorblind', 'seaborn-dark-palette', 'seaborn-dark', 'seaborn-darkgrid', 'seaborn-deep', 'seaborn-muted', 'seaborn-notebook', 'seaborn-paper', 'seaborn-pastel', 'seaborn-poster', 'seaborn-talk', 'seaborn-ticks', 'seaborn-white', 'seaborn-whitegrid', 'seaborn', 'Solarize_Light2', 'tableau-colorblind10']
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)