cnkai
# 使用matplotlib绘制折线图
import matplotlib.pyplot as plt
import numpy as np


# 在一个图形中创建两条线
fig = plt.figure(figsize=(10,6))
ax1 =fig.add_subplot(1,1,1)

ax1.set_xlabel(\'number\')
ax1.set_ylabel(\'rates\')
ax1.set_title("Line chart")

ax1.plot([13, 14, 15, 16], [0.2, 0.8, 0.5, 0.4])
ax1.plot([13, 14, 15, 16], [0.3, 0.4, 0.7, 0.8])

plt.savefig(\'line_chart.jpg\')
plt.show()

分类:

技术点:

相关文章:

  • 2021-06-02
  • 2021-11-18
  • 2021-06-08
  • 2021-05-04
  • 2022-01-13
  • 2021-09-03
  • 2021-07-12
  • 2021-04-22
猜你喜欢
  • 2021-06-27
  • 2021-12-01
  • 2021-09-25
  • 2021-10-11
  • 2021-08-19
  • 2021-06-15
相关资源
相似解决方案