topotoolbox.show#
- topotoolbox.show(*grid: GridObject, dpi: int = 100, cmap: str = 'terrain')[source]#
Display one or more GridObject instances using Matplotlib.
- Parameters:
*grid (GridObject) – One or more GridObject instances to be displayed. Each GridObject should have an attribute name and be suitable for use with imshow.
dpi (int, optional) – The resolution of the plots in dots per inch. Default is 100.
cmap (str, optional) – Matplotlib colormap that will be used in the plot.
Notes
The function creates a subplot for each GridObject instance passed as an argument. Each subplot displays the grid using the ‘terrain’ colormap. A colorbar is added to each subplot. The title of each subplot is set to the name attribute of the respective GridObject.
Examples
>>> dem1 = topotoolbox.load_dem('taiwan') >>> dem2 = topotoolbox.load_dem('perfectworld') >>> topotoolbox.show(dem1, dem2)