|
@@ -69,7 +69,21 @@ def trend_internal(conn: Connection[TupleRow], path: str, query: DictProperty):
|
|
|
|
|
|
sns.set(style="darkgrid", palette='pastel', context="talk")
|
|
sns.set(style="darkgrid", palette='pastel', context="talk")
|
|
plt.style.use("dark_background")
|
|
plt.style.use("dark_background")
|
|
- plt.rcParams.update({"grid.linewidth":0.1, "grid.alpha":0.5})
|
|
|
|
|
|
+ plt.rcParams.update({
|
|
|
|
+ "lines.color": "#ffffff",
|
|
|
|
+ "patch.edgecolor": "#ffffff",
|
|
|
|
+ "text.color": "#ffffff",
|
|
|
|
+ "axes.facecolor": "#7f7f7f",
|
|
|
|
+ "axes.edgecolor": "#ffffff",
|
|
|
|
+ "axes.labelcolor": "#ffffff",
|
|
|
|
+ "xtick.color": "#ffffff",
|
|
|
|
+ "ytick.color": "#ffffff",
|
|
|
|
+ "grid.color": "#ffffff",
|
|
|
|
+ "figure.facecolor": "#7f7f7f",
|
|
|
|
+ "figure.edgecolor": "#7f7f7f",
|
|
|
|
+ "savefig.facecolor": "#7f7f7f",
|
|
|
|
+ "savefig.edgecolor": "#7f7f7f"})
|
|
|
|
+ plt.rcParams.update({"grid.linewidth":0.2, "grid.alpha":0.5})
|
|
plt.figure(figsize=[16, 9], layout="tight")
|
|
plt.figure(figsize=[16, 9], layout="tight")
|
|
xlabel='Time'
|
|
xlabel='Time'
|
|
ylabel=f'$ / {unit}'
|
|
ylabel=f'$ / {unit}'
|
|
@@ -79,17 +93,17 @@ def trend_internal(conn: Connection[TupleRow], path: str, query: DictProperty):
|
|
ax = sns.lineplot(data=pivot, markers=True)
|
|
ax = sns.lineplot(data=pivot, markers=True)
|
|
legend = plt.figlegend(
|
|
legend = plt.figlegend(
|
|
loc='upper center', ncol=6,
|
|
loc='upper center', ncol=6,
|
|
- title_fontsize="14", fontsize="12", labelcolor='#a0a0a0',
|
|
|
|
|
|
+ title_fontsize="14", fontsize="12", labelcolor='#ffffff',
|
|
framealpha=0.5
|
|
framealpha=0.5
|
|
)
|
|
)
|
|
legend.set_title(title="Products")
|
|
legend.set_title(title="Products")
|
|
ax.legend().set_visible(False)
|
|
ax.legend().set_visible(False)
|
|
|
|
|
|
- ax.set_xlabel(xlabel, color='#a0a0a0', fontsize="14")
|
|
|
|
- ax.set_ylabel(ylabel, color='#a0a0a0', fontsize="14")
|
|
|
|
- ax.axes.tick_params(colors='#a0a0a0', labelsize="12", which='both')
|
|
|
|
|
|
+ ax.set_xlabel(xlabel, fontsize="14")
|
|
|
|
+ ax.set_ylabel(ylabel, fontsize="14")
|
|
|
|
+ ax.axes.tick_params(labelsize="12", which='both')
|
|
for _, spine in ax.spines.items():
|
|
for _, spine in ax.spines.items():
|
|
- spine.set_color('#a0a0a0')
|
|
|
|
|
|
+ spine.set_color('#ffffff')
|
|
|
|
|
|
progress[-1]["status"] = "done"
|
|
progress[-1]["status"] = "done"
|
|
yield template("loading", progress=progress)
|
|
yield template("loading", progress=progress)
|