@@ -69,7 +69,7 @@ def my_portrayal(agent):
6969 agent = Agent (model )
7070 grid .move_to_empty (agent )
7171
72- fig , ax = plt .subplots ()
72+ _ , ax = plt .subplots ()
7373 draw_space (grid , my_portrayal , ax = ax )
7474
7575 # draw space for voroinoi
@@ -80,7 +80,7 @@ def my_portrayal(agent):
8080 agent = CellAgent (model )
8181 agent .cell = grid .select_random_empty_cell ()
8282
83- fig , ax = plt .subplots ()
83+ _ , ax = plt .subplots ()
8484 draw_space (grid , my_portrayal , ax = ax )
8585
8686 # draw orthogonal grid
@@ -89,7 +89,7 @@ def my_portrayal(agent):
8989 for _ in range (10 ):
9090 agent = CellAgent (model )
9191 agent .cell = grid .select_random_empty_cell ()
92- fig , ax = plt .subplots ()
92+ _ , ax = plt .subplots ()
9393 draw_space (grid , my_portrayal , ax = ax )
9494
9595 # draw network
@@ -104,7 +104,7 @@ def my_portrayal(agent):
104104 agent = Agent (model )
105105 pos = agent .random .randint (0 , len (graph .nodes ) - 1 )
106106 grid .place_agent (agent , pos )
107- fig , ax = plt .subplots ()
107+ _ , ax = plt .subplots ()
108108 draw_space (grid , my_portrayal , ax = ax )
109109
110110 # draw continuous space
@@ -116,7 +116,7 @@ def my_portrayal(agent):
116116 agent = Agent (model )
117117 space .place_agent (agent , (x , y ))
118118
119- fig , ax = plt .subplots ()
119+ _ , ax = plt .subplots ()
120120 draw_space (space , my_portrayal , ax = ax )
121121
122122
@@ -128,7 +128,7 @@ def test_draw_hex_grid():
128128 agent = Agent (model )
129129 grid .move_to_empty (agent )
130130
131- fig , ax = plt .subplots ()
131+ _ , ax = plt .subplots ()
132132 draw_hex_grid (grid , agent_portrayal , ax )
133133
134134 model = Model (seed = 42 )
@@ -137,7 +137,7 @@ def test_draw_hex_grid():
137137 agent = CellAgent (model )
138138 agent .cell = grid .select_random_empty_cell ()
139139
140- fig , ax = plt .subplots ()
140+ _ , ax = plt .subplots ()
141141 draw_hex_grid (grid , agent_portrayal , ax )
142142
143143
@@ -152,7 +152,7 @@ def test_draw_voronoi_grid():
152152 agent = CellAgent (model )
153153 agent .cell = grid .select_random_empty_cell ()
154154
155- fig , ax = plt .subplots ()
155+ _ , ax = plt .subplots ()
156156 draw_voronoi_grid (grid , agent_portrayal , ax )
157157
158158
@@ -164,7 +164,7 @@ def test_draw_orthogonal_grid():
164164 agent = Agent (model )
165165 grid .move_to_empty (agent )
166166
167- fig , ax = plt .subplots ()
167+ _ , ax = plt .subplots ()
168168 draw_orthogonal_grid (grid , agent_portrayal , ax )
169169
170170 model = Model (seed = 42 )
@@ -173,7 +173,7 @@ def test_draw_orthogonal_grid():
173173 agent = CellAgent (model )
174174 agent .cell = grid .select_random_empty_cell ()
175175
176- fig , ax = plt .subplots ()
176+ _ , ax = plt .subplots ()
177177 draw_orthogonal_grid (grid , agent_portrayal , ax )
178178
179179
@@ -187,7 +187,7 @@ def test_draw_continuous_space():
187187 agent = Agent (model )
188188 space .place_agent (agent , (x , y ))
189189
190- fig , ax = plt .subplots ()
190+ _ , ax = plt .subplots ()
191191 draw_continuous_space (space , agent_portrayal , ax )
192192
193193
@@ -205,7 +205,7 @@ def test_draw_network():
205205 pos = agent .random .randint (0 , len (graph .nodes ) - 1 )
206206 grid .place_agent (agent , pos )
207207
208- fig , ax = plt .subplots ()
208+ _ , ax = plt .subplots ()
209209 draw_network (grid , agent_portrayal , ax )
210210
211211 model = Model (seed = 42 )
@@ -214,7 +214,7 @@ def test_draw_network():
214214 agent = CellAgent (model )
215215 agent .cell = grid .select_random_empty_cell ()
216216
217- fig , ax = plt .subplots ()
217+ _ , ax = plt .subplots ()
218218 draw_network (grid , agent_portrayal , ax )
219219
220220
@@ -224,12 +224,12 @@ def test_draw_property_layers():
224224 grid = SingleGrid (10 , 10 , torus = True )
225225 grid .add_property_layer (PropertyLayer ("test" , grid .width , grid .height , 0 ))
226226
227- fig , ax = plt .subplots ()
227+ _ , ax = plt .subplots ()
228228 draw_property_layers (grid , {"test" : {"colormap" : "viridis" , "colorbar" : True }}, ax )
229229
230230 model = Model (seed = 42 )
231231 grid = OrthogonalMooreGrid ((10 , 10 ), torus = True , random = model .random , capacity = 1 )
232232 grid .create_property_layer ("test" , 0.0 )
233233
234- fig , ax = plt .subplots ()
234+ _ , ax = plt .subplots ()
235235 draw_property_layers (grid , {"test" : {"colormap" : "viridis" , "colorbar" : True }}, ax )
0 commit comments