diff --git a/python/grass/jupyter/map.py b/python/grass/jupyter/map.py index 013ff69347..a8178c22e9 100644 --- a/python/grass/jupyter/map.py +++ b/python/grass/jupyter/map.py @@ -188,9 +188,9 @@ def wrapper(**kwargs): def show(self): """Displays a PNG image of map""" # Lazy import to avoid an import-time dependency on IPython. - from IPython.display import Image # pylint: disable=import-outside-toplevel + from IPython.display import Image, display # pylint: disable=import-outside-toplevel - return Image(self._filename) + return display(Image(self._filename)) def save(self, filename): """Saves a PNG image of map to the specified *filename*""" diff --git a/python/grass/jupyter/map3d.py b/python/grass/jupyter/map3d.py index dd373f315a..1ee09e0fb8 100644 --- a/python/grass/jupyter/map3d.py +++ b/python/grass/jupyter/map3d.py @@ -232,6 +232,6 @@ def render(self, **kwargs): def show(self): """Displays a PNG image of map""" # Lazy import to avoid an import-time dependency on IPython. - from IPython.display import Image # pylint: disable=import-outside-toplevel + from IPython.display import Image,display # pylint: disable=import-outside-toplevel - return Image(self._filename) + return display(Image(self._filename))