15
15
parser .add_argument ('-d' , '--dim' , type = str , default = "200,200" , help = 'Dimensions of the cell grid (WIDTH,HEIGHT)' )
16
16
parser .add_argument ('-i' , '--initial_val' , default = 0 , help = 'Force initial val for the cells' )
17
17
parser .add_argument ('-c' , '--state_changes' , action = "store_true" , help = 'Log state changes to csv file' )
18
+ parser .add_argument ('-f' , '--img_format' , default = "pdf" , help = 'Image format used to export the images' )
18
19
19
20
args = parser .parse_args ()
20
21
@@ -148,7 +149,7 @@ def dict_to_states_row(states_dict):
148
149
#plt.show()
149
150
plt .xlabel ("Time (s)" )
150
151
plt .ylabel ("Population (%)" )
151
- plt .savefig (base_name + "_area.png" )
152
+ plt .savefig (base_name + "_area" + args . img_format )
152
153
153
154
154
155
fig , ax = plt .subplots (figsize = (12 ,7 ))
@@ -165,7 +166,7 @@ def dict_to_states_row(states_dict):
165
166
plt .title ('Epidemic percentages (%s)' % base_name )
166
167
plt .xlabel ("Time (s)" )
167
168
plt .ylabel ("Population (%)" )
168
- plt .savefig (base_name + "_lines.png" )
169
+ plt .savefig (base_name + "_lines" + args . img_format )
169
170
170
171
171
172
df_nums = df .drop ("walls" , axis = 1 )
@@ -185,4 +186,4 @@ def dict_to_states_row(states_dict):
185
186
plt .title ('Epidemic percentages (%s)' % base_name )
186
187
plt .xlabel ("Time (s)" )
187
188
plt .ylabel ("Population (%)" )
188
- plt .savefig (base_name + "_lines_nosus.png" )
189
+ plt .savefig (base_name + "_lines_nosus" + args . img_format )
0 commit comments