GenericMappingTools / GenericMappingTools/pygmt

Figure.coast: No output of "+l|L" of "dcw" parameter ("E") when using an IDE

Open
#2,646 1 comment 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Python
Stars
874
Forks
255
Avg merge
1d 21h
Merged PRs (30d)
40

Description

### Description of the problem

_First mentioned in https://github.com/GenericMappingTools/pygmt/pull/2428#issuecomment-1536777780_.

In the docstring for the `dcw` parameter of [`pygmt.Figure.coast`](https://www.pygmt.org/dev/api/generated/pygmt.Figure.coast.html) we say:
> Append +l|+L to =continent to only list countries in that continent; repeat if more than one continent is requested.

I tried this, but so far I am not sure how it should work. I only get an output when running the python script or code directly in a terminal. When using an IDE (e.g., Spyder, JupyterLab) there is no output neither in the console nor in the terminal.
Further, this part of the docstring is not precise, as **+l** gives the codes for the countries, but **+L** gives the codes for the states/territories.

### Minimal Complete Verifiable Example

```python
import pygmt

fig = pygmt.Figure()
fig.coast(dcw="=NA+l")
fig.coast(dcw="=NA+L")
```

### Full error message

```python-traceback
No error message occurs.
No output occurs when running the code within an IDE (e.g., Spyder, JupyterLab).
```

### System information

```bash
PyGMT information:
version: v0.9.1.dev132
System information:
python: 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 17:59:51) [MSC v.1935 64 bit (AMD64)]
executable: C:\ProgramData\Anaconda3\envs\pygmt_env_dev\python.exe
machine: Windows-10-10.0.19045-SP0
Dependency information:
numpy: 1.24.3
pandas: 2.0.2
xarray: 2023.1.1.dev17
netCDF4: 1.6.2
packaging: 23.1
contextily: 1.3.0
geopandas: 0.13.2
IPython: 8.14.0
rioxarray: 0.14.1
ghostscript: 9.54.0
GMT library information:
binary version: 6.4.0
cores: 4
grid layout: rows
image layout:
library path: C:/ProgramData/Anaconda3/envs/pygmt_env_dev/Library/bin/gmt.dll
padding: 2
plugin dir: C:/ProgramData/Anaconda3/envs/pygmt_env_dev/Library/bin/gmt_plugins
share dir: C:/Program Files (x86)/gmt6/share
version: 6.4.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.