-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshape.hoc
81 lines (61 loc) · 1.68 KB
/
shape.hoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// set up shape plots with 10 evenly-spaced values
NUMVALS = 10 // # levels in the color map
IP3MINVAL = 0.0025
IP3MAXVAL = 0.025
CAMINVAL = 1.2e-4
CAMAXVAL = 12e-4
// set up RGB vectors for specifying shape plot color maps
objref rvec, gvec, bvec
proc buildmapvecs() { local i
rvec = new Vector(NUMVALS)
gvec = new Vector(NUMVALS)
bvec = new Vector(NUMVALS)
for i = 0, NUMVALS-1 {
rvec.x[i]=fscan()
gvec.x[i]=fscan()
bvec.x[i]=fscan()
// print i, rvec.x[i], gvec.x[i], bvec.x[i]
}
}
buildmapvecs()
// RGB values for thermal scale (yellow-white hottest, purple coolest
111 0 111
143 30 93
185 55 64
223 76 42
245 120 11
255 155 0
255 195 0
255 233 0
255 255 0
255 255 200
// use the RGB vectors to set up color map for shape plot passed as $o1
proc setmap() { local i
$o1.colormap(rvec.size())
for i = 0, rvec.size()-1 {
$o1.colormap(i, rvec.x[i], gvec.x[i], bvec.x[i])
}
}
// shape plot of ip3i
objref ip3sh
ip3sh = new PlotShape(0)
ip3sh.size(-10.209,151.019,-80.4855,80.4853)
ip3sh.view(-10.209, -80.4855, 161.228, 160.971, 265, 105, 200.64, 200.32)
fast_flush_list.append(ip3sh)
ip3sh.exec_menu("Shape Plot")
ip3sh.variable("ip3i")
ip3sh.exec_menu("Show Diam")
setmap(ip3sh)
ip3sh.scale(IP3MINVAL, IP3MAXVAL)
// shape plot of cai
objref cash
cash = new PlotShape(0)
cash.size(-10.209,151.019,-80.4855,80.4853)
cash.view(-10.209, -80.4855, 161.228, 160.971, 265, 369, 200.64, 200.32)
fast_flush_list.append(cash)
cash.exec_menu("Shape Plot")
cash.variable("cai")
cash.exec_menu("Show Diam")
setmap(cash)
cash.scale(CAMINVAL, CAMAXVAL)
stdinit() // so IP3 shape plot shows initial color