@@ -771,6 +771,10 @@ def test_deprecation_warnings():
771771 axs = ct .get_plot_axes (cplt .lines )
772772 assert np .all (axs == cplt .axes )
773773
774+ with pytest .warns (FutureWarning , match = "deprecated" ):
775+ ct .suptitle ("updated title" )
776+ assert cplt .figure ._suptitle .get_text () == "updated title"
777+
774778
775779def test_ControlPlot_init ():
776780 sys = ct .rss (2 , 2 , 2 )
@@ -782,6 +786,7 @@ def test_ControlPlot_init():
782786 assert np .all (cplt_raw .axes == cplt .axes )
783787 assert cplt_raw .figure == cplt .figure
784788
789+
785790def test_pole_zero_subplots (savefig = False ):
786791 ax_array = ct .pole_zero_subplots (2 , 1 , grid = [True , False ])
787792 sys1 = ct .tf ([1 , 2 ], [1 , 2 , 3 ], name = 'sys1' )
@@ -793,6 +798,16 @@ def test_pole_zero_subplots(savefig=False):
793798 if savefig :
794799 plt .savefig ("ctrlplot-pole_zero_subplots.png" )
795800
801+ # Single type of of grid for all axes
802+ ax_array = ct .pole_zero_subplots (2 , 2 , grid = 'empty' )
803+ assert ax_array [0 , 0 ].xaxis .get_label ().get_text () == ''
804+
805+ # Discrete system grid
806+ ax_array = ct .pole_zero_subplots (2 , 2 , grid = True , dt = 1 )
807+ assert ax_array [0 , 0 ].xaxis .get_label ().get_text () == 'Real'
808+ assert ax_array [0 , 0 ].get_lines ()[0 ].get_color () == 'grey'
809+
810+
796811if __name__ == "__main__" :
797812 #
798813 # Interactive mode: generate plots for manual viewing
0 commit comments