Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datasets.load_earth_mask: Unexpected display of remote dataset "earth_mask" #2629

Closed
yvonnefroehlich opened this issue Aug 15, 2023 · 1 comment · Fixed by #2632
Closed
Labels
bug Something isn't working
Milestone

Comments

@yvonnefroehlich
Copy link
Member

Description of the problem

When plotting the dataset earth_mask via pygmt.Figure.grdimage there is a difference between using grid = "@earth_mask_01d_g" and grid = pygmt.datasets.load_earth_mask(). This is not the case for the other remote datasets, e.g. earth_relief.

datasets_mask_size

Minimal Complete Verifiable Example

import pygmt

fig = pygmt.Figure()

with fig.subplot(nrows=2, ncols=2, figsize=("20c", "14c")):

    for i_grid in range(2):
                
        if i_grid == 0:
            grid_at = "@earth_relief_01d_g"
            grid_load = pygmt.datasets.load_earth_relief()
        elif i_grid == 1:
            grid_at = "@earth_mask_01d_g"
            grid_load = pygmt.datasets.load_earth_mask()
        
        # Left column
        fig.grdimage(grid=grid_at, panel=True, frame="+t@" + grid_at)
        
        # Right column
        fig.grdimage(grid=grid_load, panel=True, frame="+tdatasets.load_" + grid_at[1:11])
 
fig.show()
# fig.savefig("datasets_mask_size.png")

Full error message

No error message occurs. The two maps related to the dataset `earth_mask` are expected to be identical.

System information

PyGMT information:
  version: v0.9.1.dev120
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
@seisman
Copy link
Member

seisman commented Aug 16, 2023

Confirmed. A fix is available at #2632

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants