Python全系列 教程
3567个小节阅读:5931.8k
目录
鸿蒙应用开发
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
xxxxxxxxxx
51import matplotlib.pyplot as plt
2x=[1,2,3,4,5]
3squares=[1,4,9,16,25]
4plt.plot(x,squares)
5plt.show()
设置标签文字和线条粗细
xxxxxxxxxx
101import matplotlib.pyplot as plt
2datas=[1,2,3,4,5]
3squares=[1,4,9,16,25]
4plt.plot(datas,squares,linewidth=5) #设置线条宽
5度
6#设置图标标题,并在坐标轴上添加标签
7plt.title('Numbers',fontsize=24)
8plt.xlabel('datas',fontsize=14)
9plt.ylabel('squares',fontsize=14)
10plt.show()
实时学习反馈
1. matplotlib模块中设置标题的方法是___:
A xlabel
B title
C xticks
D yticks
答案
1=>B