diff --git a/pygmt/figure.py b/pygmt/figure.py index 5f6740743df..11539ede198 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -393,7 +393,7 @@ def show(self, dpi=300, width=500, method=None, waiting=0.5, **kwargs): ) ) - if method in ["notebook", "none"]: + if method == "notebook": if IPython is None: raise GMTError( ( diff --git a/pygmt/src/coast.py b/pygmt/src/coast.py index a9a5908bf37..8e9230514b0 100644 --- a/pygmt/src/coast.py +++ b/pygmt/src/coast.py @@ -200,7 +200,6 @@ def coast(self, **kwargs): ... ) >>> # Show the plot >>> fig.show() - """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access if not args_in_kwargs(args=["C", "G", "S", "I", "N", "E", "Q", "W"], kwargs=kwargs): diff --git a/pygmt/src/grd2cpt.py b/pygmt/src/grd2cpt.py index 8d95caaef63..ece0f28a244 100644 --- a/pygmt/src/grd2cpt.py +++ b/pygmt/src/grd2cpt.py @@ -175,7 +175,6 @@ def grd2cpt(grid, **kwargs): >>> fig.grdimage(grid=grid) >>> # show the plot >>> fig.show() - """ if kwargs.get("W") is not None and kwargs.get("Ww") is not None: raise GMTInvalidInput("Set only categorical or cyclic to True, not both.") diff --git a/pygmt/src/grdcontour.py b/pygmt/src/grdcontour.py index 68fa1b0be2f..6d43c794a44 100644 --- a/pygmt/src/grdcontour.py +++ b/pygmt/src/grdcontour.py @@ -120,7 +120,6 @@ def grdcontour(self, grid, **kwargs): ... ) >>> # show the plot >>> fig.show() - """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/grdimage.py b/pygmt/src/grdimage.py index ad00dc96f56..8deef9d8a30 100644 --- a/pygmt/src/grdimage.py +++ b/pygmt/src/grdimage.py @@ -173,7 +173,6 @@ def grdimage(self, grid, **kwargs): >>> fig.grdimage(grid=grid, cmap="geo", projection="W10c", frame="ag") >>> # show the plot >>> fig.show() - """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/inset.py b/pygmt/src/inset.py index e28bdfac111..0fbcd66143b 100644 --- a/pygmt/src/inset.py +++ b/pygmt/src/inset.py @@ -130,8 +130,7 @@ def inset(self, **kwargs): ... >>> # Map elements outside the "with" block are plotted in the main figure >>> fig.logo(position="jBR+o0.2c+w3c") - >>> fig.show() # doctest: +SKIP - + >>> fig.show() """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/solar.py b/pygmt/src/solar.py index 3be1374d7b2..130bb8d936a 100644 --- a/pygmt/src/solar.py +++ b/pygmt/src/solar.py @@ -87,7 +87,6 @@ def solar(self, terminator="d", terminator_datetime=None, **kwargs): ... ) >>> # show the plot >>> fig.show() - """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/timestamp.py b/pygmt/src/timestamp.py index 72c558bb1c4..1250fa4ba38 100644 --- a/pygmt/src/timestamp.py +++ b/pygmt/src/timestamp.py @@ -68,13 +68,11 @@ def timestamp( >>> fig = pygmt.Figure() >>> fig.timestamp() >>> fig.show() - >>> # Plot the GMT timestamp logo with a custom label. >>> fig = pygmt.Figure() >>> fig.timestamp(label="Powered by PyGMT") >>> fig.show() - """ self._preprocess() # pylint: disable=protected-access