designed unified color
This commit is contained in:
parent
69bb44bb61
commit
5071118e47
38
color/config.json
Normal file
38
color/config.json
Normal 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
15
color/usage.py
Normal 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()
|
||||||
Reference in New Issue
Block a user