mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 04:33:11 +03:00
feat(chart): Made colors for rising, falling and stagnant rates
This commit is contained in:
parent
e1fdda4b54
commit
77aaddb119
1 changed files with 7 additions and 1 deletions
|
@ -87,7 +87,13 @@ async def create_chart(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
plt.plot(newx_2, newy_2)
|
if rate[0] < rate[-1]:
|
||||||
|
plt.plot(newx_2, newy_2, color='green')
|
||||||
|
elif rate[0] > rate[-1]:
|
||||||
|
plt.plot(newx_2, newy_2, color='red', marker='o')
|
||||||
|
else:
|
||||||
|
plt.plot(newx_2, newy_2, color='grey')
|
||||||
|
|
||||||
plt.savefig(f'../charts/{name}.png')
|
plt.savefig(f'../charts/{name}.png')
|
||||||
fig.clear()
|
fig.clear()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue