Matplotlib的三层结构
import matplotlib
.pyplot
as plt
plt
.figure
()
plt
.subplots
()
plt
.plot
([1,0,9],[4,5,6])
plt
.show
()
import matplotlib
.pyplot
as plt
plt
.figure
(figsize
=(20,8),dpi
=80)
plt
.plot
([1,2,3,4,5,6,7],[17,17,18,15,14,13,12])
plt
.savefig
("test78.png")
plt
.show
()
修改刻度 支持中文: 添加网格和x,y轴信息
plt
.grid
(linestyle
="--",alpha
=0.5)
plt
.xlabel
("时间变化")
plt
.ylabel
("温度变化")
plt
.title
("某城市11点到12点的温度变化")
转载请注明原文地址: https://lol.8miu.com/read-3172.html