diff --git a/metpy/plots/skewt.py b/metpy/plots/skewt.py index 416a9ecc377..712c39fbfd4 100644 --- a/metpy/plots/skewt.py +++ b/metpy/plots/skewt.py @@ -474,6 +474,7 @@ def plot_dry_adiabats(self, t0=None, p=None, **kwargs): kwargs.setdefault('linestyles', 'dashed') kwargs.setdefault('alpha', 0.5) self.dry_adiabats = self.ax.add_collection(LineCollection(linedata, **kwargs)) + return self.dry_adiabats def plot_moist_adiabats(self, t0=None, p=None, **kwargs): r"""Plot moist adiabats. @@ -531,6 +532,7 @@ def plot_moist_adiabats(self, t0=None, p=None, **kwargs): kwargs.setdefault('linestyles', 'dashed') kwargs.setdefault('alpha', 0.5) self.moist_adiabats = self.ax.add_collection(LineCollection(linedata, **kwargs)) + return self.moist_adiabats def plot_mixing_lines(self, w=None, p=None, **kwargs): r"""Plot lines of constant mixing ratio. @@ -583,6 +585,7 @@ def plot_mixing_lines(self, w=None, p=None, **kwargs): kwargs.setdefault('linestyles', 'dashed') kwargs.setdefault('alpha', 0.8) self.mixing_lines = self.ax.add_collection(LineCollection(linedata, **kwargs)) + return self.mixing_lines def shade_area(self, y, x1, x2=0, which='both', **kwargs): r"""Shade area between two curves. diff --git a/metpy/plots/tests/test_skewt.py b/metpy/plots/tests/test_skewt.py index 0311194ca3d..a716be1c777 100644 --- a/metpy/plots/tests/test_skewt.py +++ b/metpy/plots/tests/test_skewt.py @@ -42,6 +42,11 @@ def test_skewt_api(): skew.plot_moist_adiabats() skew.plot_mixing_lines() + # Call again to hit removal statements + skew.plot_dry_adiabats() + skew.plot_moist_adiabats() + skew.plot_mixing_lines() + return fig