ming преди 4 години
родител
ревизия
605ca6d543
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      newbot.py

+ 2 - 2
newbot.py

@@ -169,7 +169,7 @@ async def get_trend_image(kw_id):
 
     x = np.array(x_axis)
     y = np.array(y_axis)
-    
+
         
     # create an array of numbers for the dates
     x_dates = np.array([dates.date2num(i) for i in x])
@@ -188,7 +188,7 @@ async def get_trend_image(kw_id):
     plt.plot(x_new, y_smooth)
     target_path = 'trend_image/'+kw+'.png'
     plt.savefig(target_path)
-
+    plt.clf()
     return FileResponse(target_path)