@@ -1551,7 +1551,7 @@ def short_time_fft(
15511551 ... ylabel=f"Freq. $f$ in Hz)",
15521552 ... xlim=(t_lo, t_hi)
15531553 ... )
1554- # >>> _ = ax1.plot(t_x, f_i, 'r--', alpha=.5, label='$f_i(t)$')
1554+ >>> _ = ax1.plot(t_x, f_i, 'r--', alpha=.5, label='$f_i(t)$')
15551555 >>> _ = fig1.colorbar(im1, label="Magnitude $|S_x(t, f)|$")
15561556 >>> # Shade areas where window slices stick out to the side
15571557 >>> for t0_, t1_ in [(t_lo, 1), (49, t_hi)]:
@@ -1856,7 +1856,8 @@ def plot_1d( # pylint: disable=too-many-statements
18561856 None
18571857 """
18581858 # Define a mesh and y values at mesh nodes for plotting
1859- fig , ax = plt .subplots ()
1859+ fig = plt .figure ()
1860+ ax = fig .axes
18601861 if self ._source_type is SourceType .CALLABLE :
18611862 # Determine boundaries
18621863 domain = [0 , 10 ]
@@ -1894,9 +1895,9 @@ def plot_1d( # pylint: disable=too-many-statements
18941895 plt .title (self .title )
18951896 plt .xlabel (self .__inputs__ [0 ].title ())
18961897 plt .ylabel (self .__outputs__ [0 ].title ())
1898+ show_or_save_plot (filename )
18971899 if return_object :
18981900 return fig , ax
1899- show_or_save_plot (filename )
19001901
19011902 @deprecated (
19021903 reason = "The `Function.plot2D` method is set to be deprecated and fully "
0 commit comments