Skip to content

Commit ea9e7dc

Browse files
committed
Make tile_map doctest faster by using a smaller zoom level
Just plotting the Southern Hemisphere at zoom level 1.
1 parent 63aaaa0 commit ea9e7dc

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

pygmt/datasets/tile_map.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,18 @@ def load_tile_map(region, zoom="auto", source=None, lonlat=True, wait=0, max_ret
9494
>>> import contextily
9595
>>> from pygmt.datasets import load_tile_map
9696
>>> raster = load_tile_map(
97-
... region=[103.60, 104.06, 1.22, 1.49], # West, East, South, North
97+
... region=[-180.0, 180.0, -90.0, 0.0], # West, East, South, North
98+
... zoom=1, # less detailed zoom level
9899
... source=contextily.providers.Stamen.TerrainBackground,
99100
... lonlat=True, # bounding box coordinates are longitude/latitude
100101
... )
101102
>>> raster.sizes
102-
Frozen({'band': 3, 'y': 1024, 'x': 1536})
103+
Frozen({'band': 3, 'y': 256, 'x': 512})
103104
>>> raster.coords
104105
Coordinates:
105106
* band (band) uint8 0 1 2
106-
* y (y) float64 1.663e+05 1.663e+05 1.663e+05 ... 1.272e+05 ...
107-
* x (x) float64 1.153e+07 1.153e+07 1.153e+07 ... 1.158e+07 ...
107+
* y (y) float64 -7.081e-10 -7.858e+04 ... -1.996e+07 -2.004e+07
108+
* x (x) float64 -2.004e+07 -1.996e+07 ... 1.996e+07 2.004e+07
108109
"""
109110
# pylint: disable=too-many-locals
110111
if contextily is None:

0 commit comments

Comments
 (0)