import matplotlib.pyplot as plt
import os
import sys
from datetime import datetime

def draw_reward(log_reward:list)->None:
    plt.plot(log_reward,c='b')
    path = os.path.join(os.getcwd(),"plot")
    if not os.path.exists(path):
        os.makedirs(path)
    plt.savefig(path+'/reward_'+datetime.today().strftime('%Y%m%d_%H%M')+'.png')
    plt.show()
if __name__ == '__main__':
    test = [1,2,3,4,5]
    draw_reward(test)


import matplotlib.pyplot as plt
import os
import sys
from datetime import datetime

def draw_reward(log_reward:list)->None:
    plt.plot(log_reward,c='b')
    path = os.path.join(os.getcwd(),"plot")
    if not os.path.exists(path):
        os.makedirs(path)
    plt.savefig(path+'/reward_'+datetime.today().strftime('%Y%m%d_%H%M')+'.png')
    plt.show()
if __name__ == '__main__':
    test = [1,2,3,4,5]
    draw_reward(test)

