class zhexiantu:
"""一个简单的折线图"""
def __init__(self, x, y_max, y_min):
self.x = x
self.y_max = max
self.y_min = min
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(1,15)
y_max = np.array([30,24,33,37,30,28,24,30,32,30,33,31,23,27])
y_min = np.array([16,20,22,18,20,21,15,19,21,17,21,25,20,21])
# 绘图
plt.plot(x, y_max, color='blue')
plt.plot(x, y_min, color='pink')
plt.show()
可视化之折线图
于 2023-09-22 00:45:35 首次发布