|
@@ -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)
|
|
|
|
|
|
|