@@ -141,8 +141,8 @@ def test_response_plots(
141141# Use the manaul response to verify that different settings are working
142142def test_manual_response_limits ():
143143 # Default response: limits should be the same across rows
144- out = manual_response .plot ()
145- axs = ct .get_plot_axes (out )
144+ cplt = manual_response .plot ()
145+ axs = ct .get_plot_axes (cplt ) # legacy usage OK
146146 for i in range (manual_response .noutputs ):
147147 for j in range (1 , manual_response .ninputs ):
148148 # Everything in the same row should have the same limits
@@ -397,18 +397,18 @@ def test_gangof4_trace_labels():
397397 C = ct .rss (1 , 1 , 1 , name = 'C' )
398398
399399 # Make sure default labels are as expected
400- out = ct .gangof4_response (P1 , C ).plot ()
401- out = ct .gangof4_response (P2 , C ).plot ()
402- axs = ct .get_plot_axes (out )
400+ cplt = ct .gangof4_response (P1 , C ).plot ()
401+ cplt = ct .gangof4_response (P2 , C ).plot ()
402+ axs = ct .get_plot_axes (cplt ) # legacy usage OK
403403 legend = axs [0 , 1 ].get_legend ().get_texts ()
404404 assert legend [0 ].get_text () == 'None'
405405 assert legend [1 ].get_text () == 'None'
406406 plt .close ()
407407
408408 # Override labels
409- out = ct .gangof4_response (P1 , C ).plot (label = 'xxx, line1, yyy' )
410- out = ct .gangof4_response (P2 , C ).plot (label = 'xxx, line2, yyy' )
411- axs = ct .get_plot_axes (out )
409+ cplt = ct .gangof4_response (P1 , C ).plot (label = 'xxx, line1, yyy' )
410+ cplt = ct .gangof4_response (P2 , C ).plot (label = 'xxx, line2, yyy' )
411+ axs = ct .get_plot_axes (cplt ) # legacy usage OK
412412 legend = axs [0 , 1 ].get_legend ().get_texts ()
413413 assert legend [0 ].get_text () == 'xxx, line1, yyy'
414414 assert legend [1 ].get_text () == 'xxx, line2, yyy'
@@ -426,8 +426,8 @@ def test_freqplot_line_labels(plt_fcn):
426426 ct .set_defaults ('freqplot' , suptitle_frame = 'figure' )
427427
428428 # Make sure default labels are as expected
429- out = plt_fcn ([sys1 , sys2 ])
430- axs = ct .get_plot_axes (out )
429+ cplt = plt_fcn ([sys1 , sys2 ])
430+ axs = ct .get_plot_axes (cplt ) # legacy usage OK
431431 if axs .ndim == 1 :
432432 legend = axs [0 ].get_legend ().get_texts ()
433433 else :
@@ -437,8 +437,8 @@ def test_freqplot_line_labels(plt_fcn):
437437 plt .close ()
438438
439439 # Override labels all at once
440- out = plt_fcn ([sys1 , sys2 ], label = ['line1' , 'line2' ])
441- axs = ct .get_plot_axes (out )
440+ cplt = plt_fcn ([sys1 , sys2 ], label = ['line1' , 'line2' ])
441+ axs = ct .get_plot_axes (cplt ) # legacy usage OK
442442 if axs .ndim == 1 :
443443 legend = axs [0 ].get_legend ().get_texts ()
444444 else :
@@ -448,9 +448,9 @@ def test_freqplot_line_labels(plt_fcn):
448448 plt .close ()
449449
450450 # Override labels one at a time
451- out = plt_fcn (sys1 , label = 'line1' )
452- out = plt_fcn (sys2 , label = 'line2' )
453- axs = ct .get_plot_axes (out )
451+ cplt = plt_fcn (sys1 , label = 'line1' )
452+ cplt = plt_fcn (sys2 , label = 'line2' )
453+ axs = ct .get_plot_axes (cplt ) # legacy usage OK
454454 if axs .ndim == 1 :
455455 legend = axs [0 ].get_legend ().get_texts ()
456456 else :
@@ -475,8 +475,8 @@ def test_line_labels_bode(kwargs, labels):
475475 with pytest .raises (ValueError , match = "number of labels must match" ):
476476 ct .bode_plot ([sys1 , sys2 ], label = ['line1' ])
477477
478- out = ct .bode_plot ([sys1 , sys2 ], label = labels , ** kwargs )
479- axs = ct .get_plot_axes (out )
478+ cplt = ct .bode_plot ([sys1 , sys2 ], label = labels , ** kwargs )
479+ axs = ct .get_plot_axes (cplt ) # legacy usage OK
480480 legend_texts = axs [0 , - 1 ].get_legend ().get_texts ()
481481 for i , legend in enumerate (legend_texts ):
482482 assert legend .get_text () == labels [i ]
@@ -502,22 +502,22 @@ def test_freqplot_ax_keyword(plt_fcn, ninputs, noutputs):
502502 sys = ct .rss (4 , ninputs , noutputs )
503503
504504 # Create an initial figure
505- out1 = plt_fcn (sys )
505+ cplt1 = plt_fcn (sys )
506506
507507 # Draw again on the same figure, using array
508- axs = ct .get_plot_axes (out1 )
509- out2 = plt_fcn (sys , ax = axs )
510- np .testing .assert_equal (ct . get_plot_axes ( out1 ), ct . get_plot_axes ( out2 ) )
508+ axs = ct .get_plot_axes (cplt1 ) # legacy usage OK
509+ cplt2 = plt_fcn (sys , ax = axs )
510+ np .testing .assert_equal (cplt1 . axes , cplt2 . axes )
511511
512512 # Pass things in as a list instead
513513 axs_list = axs .tolist ()
514- out3 = plt_fcn (sys , ax = axs )
515- np .testing .assert_equal (ct . get_plot_axes ( out1 ), ct . get_plot_axes ( out3 ) )
514+ cplt3 = plt_fcn (sys , ax = axs )
515+ np .testing .assert_equal (cplt1 . axes , cplt3 . axes )
516516
517517 # Flatten the list
518518 axs_list = axs .squeeze ().tolist ()
519- out3 = plt_fcn (sys , ax = axs_list )
520- np .testing .assert_equal (ct . get_plot_axes ( out1 ), ct . get_plot_axes ( out3 ) )
519+ cplt4 = plt_fcn (sys , ax = axs_list )
520+ np .testing .assert_equal (cplt1 . axes , cplt4 . axes )
521521
522522
523523def test_mixed_systypes ():
@@ -552,7 +552,7 @@ def test_suptitle():
552552 sys = ct .rss (2 , 2 , 2 )
553553
554554 # Default location: center of axes
555- out = ct .bode_plot (sys )
555+ cplt = ct .bode_plot (sys )
556556 assert plt .gcf ()._suptitle ._x != 0.5
557557
558558 # Try changing the the title
0 commit comments