Skip to content

Commit

Permalink
Add IPython.core.display.Image object output to 5 doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
weiji14 committed Dec 30, 2022
1 parent 5e170ac commit 2901e36
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pygmt/src/coast.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ def coast(self, **kwargs):
... )
>>> # Show the plot
>>> fig.show()
<IPython.core.display.Image object>
"""
kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access
if not args_in_kwargs(args=["C", "G", "S", "I", "N", "E", "Q", "W"], kwargs=kwargs):
Expand Down
1 change: 1 addition & 0 deletions pygmt/src/grd2cpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def grd2cpt(grid, **kwargs):
>>> fig.grdimage(grid=grid)
>>> # show the plot
>>> fig.show()
<IPython.core.display.Image object>
"""
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.")
Expand Down
1 change: 1 addition & 0 deletions pygmt/src/grdcontour.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def grdcontour(self, grid, **kwargs):
... )
>>> # show the plot
>>> fig.show()
<IPython.core.display.Image object>
"""
kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access
with Session() as lib:
Expand Down
1 change: 1 addition & 0 deletions pygmt/src/grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def grdimage(self, grid, **kwargs):
>>> fig.grdimage(grid=grid, cmap="geo", projection="W10c", frame="ag")
>>> # show the plot
>>> fig.show()
<IPython.core.display.Image object>
"""
kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access
with Session() as lib:
Expand Down
1 change: 1 addition & 0 deletions pygmt/src/solar.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def solar(self, terminator="d", terminator_datetime=None, **kwargs):
... )
>>> # show the plot
>>> fig.show()
<IPython.core.display.Image object>
"""

kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access
Expand Down

0 comments on commit 2901e36

Please sign in to comment.