# 一元一次方程
# 2*x+9y=81 ===> y = (81-2*x)/9
# 3*x+y=34 ====> y = 34-3*x
# 生产数据
x1 = []
y1 = []
x2 = []
y2 = []
for i in range(-100,100):
x1.append(i)
y1.append((81-2*i)/9)
x2.append(i)
y2.append(34-3*i)
import matplotlib.pyplot as plt
plt.plot(x1,y1)
plt.plot(x2,y2)
plt.show()
# 画图
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['SimHei']
# 1.生产数据
# 王者荣耀,玩家人数 年份
x = [2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020]
y = [0, 0,0,0,0,280000,620000,260000,90000,140000]
# 画折线图
plt.plot(x,y)
plt.xlabel("年份")
plt.ylabel("人数")
# 展示
plt.show()
```