5
5
6
6
import numpy as np
7
7
from matplotlib import pyplot as plt
8
- #import random
8
+
9
+ # import random
9
10
import helper_funcs as hf
10
11
11
12
12
- def reload_single_run (show_plot = True ):
13
+ def reload_single_run (show_plot = True , verbose = False ):
14
+
13
15
N_muscles = 24 # Number of muscles alongside the body
14
16
N_units = 10 # Number of neural units in VNC
15
17
N_neuronsperunit = 6 # Number of neurons in a VNC neural unit (6 neurons)
@@ -36,7 +38,7 @@ def reload_single_run(show_plot=True):
36
38
act_data [0 ], act_data [i ], label = "SR %i" % (i - offset ), linewidth = 0.5
37
39
)
38
40
axs [0 , 0 ].xaxis .set_ticklabels ([])
39
- plt .legend ()
41
+ # plt.legend()
40
42
41
43
axs [0 , 1 ].imshow (sr , aspect = "auto" , interpolation = "nearest" )
42
44
axs [0 , 1 ].xaxis .set_ticklabels ([])
@@ -49,7 +51,7 @@ def reload_single_run(show_plot=True):
49
51
act_data [0 ], act_data [i ], label = "Neu %i" % (i - offset ), linewidth = 0.5
50
52
)
51
53
axs [1 , 0 ].xaxis .set_ticklabels ([])
52
- plt .legend ()
54
+ # plt.legend()
53
55
54
56
neu = act_data [offset : N_neurons + offset ]
55
57
axs [1 , 1 ].imshow (neu , aspect = "auto" , interpolation = "nearest" )
@@ -63,7 +65,7 @@ def reload_single_run(show_plot=True):
63
65
act_data [0 ], act_data [i ], label = "Mu %i" % (i - offset ), linewidth = 0.5
64
66
)
65
67
axs [2 , 0 ].xaxis .set_ticklabels ([])
66
- plt .legend ()
68
+ # plt.legend()
67
69
68
70
mus = act_data [offset : N_muscles + offset ]
69
71
axs [2 , 1 ].imshow (mus , aspect = "auto" , interpolation = "nearest" )
@@ -92,14 +94,14 @@ def reload_single_run(show_plot=True):
92
94
f = float (t ) / tmax
93
95
94
96
color = "#%02x%02x00" % (int (0xFF * (f )), int (0xFF * (1 - f ) * 0.8 ))
95
- #color2 = "#%06x" % random.randint(0, 0xFFFFFF)
97
+ # color2 = "#%06x" % random.randint(0, 0xFFFFFF)
96
98
97
99
point_start = 1
98
100
for i in range (point_start , 50 ):
99
101
x = body_data [i * 3 + 1 ][t ]
100
102
y = body_data [i * 3 + 2 ][t ]
101
- #y1 = body_data[i * 3 + 2][t]
102
- if i == 1 :
103
+ # y1 = body_data[i * 3 + 2][t]
104
+ if i == 1 and verbose :
103
105
print (
104
106
"%s + Plotting %i at t=%s (%s,%s), %s"
105
107
% ("\n " if i == point_start else "" , i , t , x , y , color )
0 commit comments