designed unified color

This commit is contained in:
zjcOvO 2025-01-23 22:36:02 +08:00
parent 69bb44bb61
commit 5071118e47
2 changed files with 53 additions and 0 deletions

38
color/config.json Normal file
View File

@ -0,0 +1,38 @@
{
"color_pool":[
"#ec6941",
"#f19149",
"#f8b551",
"#fff45c",
"#b3d465",
"#80c269",
"#32b16c",
"#13b5b1",
"#00b7ee",
"#448aca",
"#556fb5",
"#5f52a0",
"#8957a1",
"#ae5da1",
"#ea68a2",
"#eb6877"
],
"color":[
"#ec6941",
"#80c269",
"#448aca",
"#ea68a2",
"#f8b551",
"#13b5b1",
"#5f52a0",
"#eb6877",
"#fff45c",
"#00b7ee",
"#8957a1",
"#f19149",
"#32b16c",
"#556fb5",
"#ae5da1",
"#b3d465"
]
}

15
color/usage.py Normal file
View File

@ -0,0 +1,15 @@
import json
import numpy as np
import matplotlib.pyplot as plt
colorList = json.load(open('config.json','r'))["color"]
N=5
data = [ np.random.randn(19)/3 + N - i for i in range(N)]
for i in range(N):
plt.plot(data[i], color=colorList[i])
plt.legend(['data1', 'data2', 'data3', 'data4', 'data5'])
plt.show()