折线图
import pandas as pd
from matplotlib import pyplot as plt
import numpy as np
df = pd.read_csv("pre1.csv")
df=df[400:500]
plt.figure(figsize=(7,3),dpi=300)
plt.grid()
time = df['time']
LSTM = df['LSTM']
AttentionLSTM = df['A-LSTM']
CNNLSTM = df['CNN-LSTM']
DNN = df['DNN']
ACLSTM = df['AMC-LSTM']
real = df['real']
plt.plot(time, LSTM, color='black')
plt.plot(time, CNNLSTM, color='deeppink')
plt.plot(time, DNN, color='gold')
plt.plot(time, AttentionLSTM, color='gray')
plt.plot(time, real, color='red')
plt.plot(time, ACLSTM, color='blue')
my_y_ticks = np.arange(0, 1.0, 0.2)
plt.xticks(fontsize=13)
plt.yticks(my_y_ticks,fontsize=13)
plt.ylabel("Normalized Wind Power",fontsize=15)
plt.show()