This commit is contained in:
XXAY
2021-10-03 00:09:58 +08:00
parent e1d7e926cc
commit c1edaaab61
25 changed files with 1789 additions and 251 deletions
+4 -2
View File
@@ -1172,7 +1172,8 @@ def Time_Series_Plot(file_path, chart_out_path, out_path,
# Draw Plot
plt.figure(figsize=(9.4, 4.25), dpi=180)
plt.plot(df[x_column], df[y_column], color=polt_color)
# plt.plot(df['date'], df['value'], color='#365770')
# print(file_path)
# Decoration
plt.ylim(y_scale_min, y_scale_max)
xtick_location = df.index.tolist()[::12]
@@ -1186,7 +1187,7 @@ def Time_Series_Plot(file_path, chart_out_path, out_path,
plt.yticks(fontsize=y_font_size, alpha=.7)
plt.title(title, fontsize=title_font_size)
plt.grid(axis='both', alpha=.3)
plt.show()
plt.xticks(rotation=x_scale_font_angle, fontsize=10)
plt.yticks(rotation=y_scale_font_angle, fontsize=10)
@@ -1198,6 +1199,7 @@ def Time_Series_Plot(file_path, chart_out_path, out_path,
plt.gca().spines["bottom"].set_alpha(0.3)
plt.gca().spines["right"].set_alpha(0.0)
plt.gca().spines["left"].set_alpha(0.3)
plt.savefig(f"{chart_out_path}") # 保存图片
plt.savefig(f"{out_path}.png")
plt.savefig(f"{out_path}.svg")