Maps.snapshot#
- Maps.snapshot(*args, **kwargs)#
Print a static image of the figure to the active IPython display.
This is useful if you want to print a snapshot of the current state of the map to the active Jupyter Notebook cell or the currently active IPython console while using a backend that creates popup-plots (e.g. qt or tkinter)
ONLY use this if you work in an interactive IPython terminal, a Jupyter Notebook or a Jupyter Lab environment!
- Parameters:
*layer (str or None) – The layer to show on the snapshot. Any positional arguments are used as layer-assignments similar to m.show_layer() If None, the currently visible layer is used. The default is None.
transparent (bool) – Indicator if the snapshot should have a transparent background or not. The default is False.
clear (bool) – Indicator if the current cell-output should be cleared prior to showing the snapshot or not. The default is False
Examples
>>> m = Maps(layer="base") >>> m.add_feature.preset.coastline() >>> m2 = m.new_layer("ocean") >>> m.add_feature.preset.ocean() >>> m.snapshot("base", ("ocean", .5), transparent=True)