File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 21
21
cmap .set_under ("r" )
22
22
norm = Normalize (1 , 8 )
23
23
24
- nus = {
24
+ line_nus = {
25
25
# arbitrary functions
26
26
"lw" : lambda lw : min (1 + lw , 5 ),
27
27
# standard color mapping
30
30
"ls" : lambda cat : {"A" : "-" , "B" : ":" , "C" : "--" }[cat [()]],
31
31
}
32
32
33
+ text_nus = {
34
+ "text" : lambda j , cat : f"index={ j [()]} class={ cat [()]!r} " ,
35
+ "y" : lambda j : j ,
36
+ }
37
+
38
+
33
39
th = np .linspace (0 , 2 * np .pi , 128 )
34
40
delta = np .pi / 9
35
41
48
54
ax .add_artist (
49
55
LineWrapper (
50
56
ac ,
51
- nus ,
57
+ line_nus ,
52
58
)
53
59
)
54
60
ax .add_artist (
55
61
FormatedText (
56
62
ac ,
57
- { "text" : lambda j , cat : f"index= { j [()] } class= { cat [()]!r } " , "y" : lambda j : j } ,
63
+ text_nus ,
58
64
x = 2 * np .pi ,
59
65
ha = "right" ,
60
66
bbox = {"facecolor" : "gray" , "alpha" : 0.5 },
You can’t perform that action at this time.
0 commit comments