@@ -186,11 +186,13 @@ def test_root_locus_documentation(savefigs=False):
186
186
sys = ct .tf ([1 , 2 ], [1 , 2 , 3 ], name = 'SISO transfer function' )
187
187
response = ct .pole_zero_map (sys )
188
188
ct .pole_zero_plot (response )
189
- plt .savefig ('pzmap-siso_ctime-default.png' )
189
+ if savefigs :
190
+ plt .savefig ('pzmap-siso_ctime-default.png' )
190
191
191
192
plt .figure ()
192
193
ct .root_locus_map (sys ).plot ()
193
- plt .savefig ('rlocus-siso_ctime-default.png' )
194
+ if savefigs :
195
+ plt .savefig ('rlocus-siso_ctime-default.png' )
194
196
195
197
# TODO: generate event in order to generate real title
196
198
plt .figure ()
@@ -200,18 +202,21 @@ def test_root_locus_documentation(savefigs=False):
200
202
with plt .rc_context (freqplot_rcParams ):
201
203
ax .set_title (
202
204
"Clicked at: -2.729+1.511j gain = 3.506 damping = 0.8748" )
203
- plt .savefig ('rlocus-siso_ctime-clicked.png' )
205
+ if savefigs :
206
+ plt .savefig ('rlocus-siso_ctime-clicked.png' )
204
207
205
208
plt .figure ()
206
209
sysd = sys .sample (0.1 )
207
210
ct .root_locus_plot (sysd )
208
- plt .savefig ('rlocus-siso_dtime-default.png' )
211
+ if savefigs :
212
+ plt .savefig ('rlocus-siso_dtime-default.png' )
209
213
210
214
plt .figure ()
211
215
sys1 = ct .tf ([1 , 2 ], [1 , 2 , 3 ], name = 'sys1' )
212
216
sys2 = ct .tf ([1 , 0.2 ], [1 , 1 , 3 , 1 , 1 ], name = 'sys2' )
213
217
ct .root_locus_plot ([sys1 , sys2 ], grid = False )
214
- plt .savefig ('rlocus-siso_multiple-nogrid.png' )
218
+ if savefigs :
219
+ plt .savefig ('rlocus-siso_multiple-nogrid.png' )
215
220
216
221
217
222
if __name__ == "__main__" :
0 commit comments