Skip to content

Commit 43c816c

Browse files
committed
Set colours to use to provide consistency as the year changes
1 parent be35142 commit 43c816c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

app.py

+14
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@
2020
table_years = df.index.unique()
2121
variables = df.columns
2222

23+
segre_colours = {
24+
'stable': 'black',
25+
'B-': 'red',
26+
'B+': 'blue',
27+
'A': 'yellow',
28+
'n' : 'limegreen',
29+
'2n' : 'darkgreen',
30+
'p' : 'magenta',
31+
'2p' : 'purple',
32+
'EC' : 'orange',
33+
'SF' : 'cyan'
34+
}
35+
2336

2437
@app.callback(
2538
[
@@ -54,6 +67,7 @@ def update_graph(y_var, x_value, year):
5467
y="Z",
5568
hover_name="Symbol",
5669
color="Decay",
70+
color_discrete_map=segre_colours,
5771
template="plotly_dark",
5872
)
5973

0 commit comments

Comments
 (0)