Closed calum-chamberlain closed 1 year ago
On my main windows machine today it looks like GMT maps in module 4A are not always using the region defined by the grid when plotting topography.
The plot here:
Should look like this:
To do this I had to change the code from:
DEM = pygmt.datasets.load_earth_relief( resolution='01s', region=[174.5, 175, -41.5, -41]) fig = pygmt.Figure() pygmt.config(MAP_FRAME_TYPE='plain', FORMAT_GEO_MAP='ddd.xx') fig.grdimage(grid=DEM, projection='M10c', frame=['WSne', 'xa0.2f0.1', 'ya0.2f0.1'] cmap='geo') fig.coast(shorelines=True) fig.colorbar(frame=["a200f100", "x+lElevation", "y+lm"], position='JRM') fig.show()
to:
DEM = pygmt.datasets.load_earth_relief( resolution='01s', region=[174.5, 175, -41.5, -41]) fig = pygmt.Figure() fig.basemap( region=[174.5, 175, -41.5, -41], projection='M10c', frame=['WSne', 'xa0.2f0.1', 'ya0.2f0.1']) pygmt.config(MAP_FRAME_TYPE='plain', FORMAT_GEO_MAP='ddd.xx') fig.grdimage(grid=DEM, cmap='geo') fig.coast(shorelines=True) fig.colorbar(frame=["a200f100", "x+lElevation", "y+lm"], position='JRM') fig.show()
e.g. adding in a basemap to set the region to start with. It looks like the basemap region is being remembered from a previous NZ-wide plot.
Fixed in master.
On my main windows machine today it looks like GMT maps in module 4A are not always using the region defined by the grid when plotting topography.
The plot here:
Should look like this:
To do this I had to change the code from:
to:
e.g. adding in a basemap to set the region to start with. It looks like the basemap region is being remembered from a previous NZ-wide plot.