GenericMappingTools / GenericMappingTools/pygmt
Figure.tilemap: handle longitude given as 0°-360°
- Dominant language
- Python
- Stars
- 874
- Forks
- 255
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 40
Description
`pygmt.Figure.coast` and the remote datasets (plotted via `pygmt.Figure.grdimage`) support that the longitude is given either as -180° to 180° East or as 0° to 360° East. However, it looks like the later longitude range is not supported by `pygmt.Figure.tilemap`. When plotting tiles for a region exceeding 180° East, the area after 180° East remains empty.
```python
import pygmt as gmt
region_lon360 = [120, 190, -48, -9]
fig = gmt.Figure()
fig.tilemap(
region=region_lon360,
projection="M10c",
zoom=2,
frame=["WSne+ttilemap", "af"],
)
fig.shift_origin(xshift="11c")
fig.coast(
region=region_lon360,
projection="M10c",
shorelines="1/1p,black",
water="steelblue",
frame=["wSne+tcoast", "af"],
)
fig.shift_origin(xshift="11c")
fig.grdimage(
region=region_lon360,
projection="M10c",
grid="@earth_relief_01d_g",
frame=["wSne+tremote dataset", "af"],
)
fig.show()
# fig.savefig(fname="tilemap_lon0to360.png")
```
_Output figure_:

Contributor guide
Assessment
This issue has not been assessed yet.