script to reproduce:
import pygmt
fig = pygmt.Figure()
fig.tilemap(
#region=[-63.6833, -63.5667, 44.65, 44.7333],
region=[-7088268.57626, -7078991.95203, 5567892.48683, 5579637.51917],
#projection="EPSG:3857",
lonlat=False,
projection="x1:50000",
# Set level of details (0-22)
# Please note, not all zoom levels are always available
zoom=14,
# Use tiles from OpenStreetMap tile server
source="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
)
fig.savefig("tilemap_EPSG3857.png")
error messages:
Traceback (most recent call last):
File "/home/mkononets/GIS data/Bedford Basin/test_pygmt_tilemap_BB.py", line 3, in <module>
fig.tilemap(
File "/home/mkononets/mambaforge/envs/pygmt/lib/python3.11/site-packages/pygmt/helpers/decorators.py", line 598, in new_module
return module_func(*args, **kwargs)
File "/home/mkononets/mambaforge/envs/pygmt/lib/python3.11/site-packages/pygmt/helpers/decorators.py", line 738, in new_module
return module_func(*args, **kwargs)
File "/home/mkononets/mambaforge/envs/pygmt/lib/python3.11/site-packages/pygmt/src/tilemap.py", line 148, in tilemap
lib.call_module(
File "/home/mkononets/mambaforge/envs/pygmt/lib/python3.11/site-packages/pygmt/clib/session.py", line 628, in call_module
raise GMTCLibError(
pygmt.exceptions.GMTCLibError: Module 'grdimage' failed with status code 79:
grdimage [ERROR]: Byte image without indexed color requires a CPT via -C
pygmt.show_versions()
:
PyGMT information:
version: v0.10.0
System information:
python: 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:08:17) [GCC 12.2.0]
executable: /home/mkononets/mambaforge/envs/pygmt/bin/python3.11
machine: Linux-5.15.0-53-generic-x86_64-with-glibc2.35
Dependency information:
numpy: 1.25.2
pandas: 2.0.3
xarray: 2023.7.0
netCDF4: 1.6.4
packaging: 23.1
contextily: 1.3.0
geopandas: 0.13.2
IPython: 8.14.0
rioxarray: 0.14.1
ghostscript: 10.02.0
GMT library information:
binary version: 6.5.0_5496e05_2023.10.05
cores: 4
grid layout: rows
image layout:
library path: /home/mkononets/mambaforge/envs/pygmt/lib/libgmt.so
padding: 2
plugin dir: /home/mkononets/mambaforge/envs/pygmt/lib/gmt/plugins
share dir: /home/mkononets/mambaforge/envs/pygmt/share/gmt
version: 6.5.0