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

Wrong annotation and gridline positions for rounded values #8490

Open
yvonnefroehlich opened this issue May 16, 2024 · 0 comments
Open

Wrong annotation and gridline positions for rounded values #8490

yvonnefroehlich opened this issue May 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@yvonnefroehlich
Copy link
Member

yvonnefroehlich commented May 16, 2024

Description of the problem

In case the longitude and latitude values which are used for the annotations and gridlines of the map frame are rounded by GMT, they are placed incorrectly, as their positions are not adjusted accordingly to the rounding effect (see middle map in the example below). This is especially problematic for small study areas and leads to misleading maps. Annotations and gridlines are only placed correctly if steps are specified (see the right map).

Edit 2024/05/24: Also set a fixed step of 0.0025 for the ticks (f) for the right map, to make the white and black areas of the fancy frame match the major ticks.

Full script that generated the error

gmt begin frame_small_area_basemap_gmt

    gmt basemap -R-157.84/-157.80/21.255/21.285 -JM8c -Bafg --FORMAT_GEO_MAP=ddd.xxxF

    gmt basemap -R-157.84/-157.80/21.255/21.285 -JM8c -Bafg --FORMAT_GEO_MAP=ddd.xxF -Xw+2c

    gmt basemap -R-157.84/-157.80/21.255/21.285 -JM8c -Ba0.01f0.0025g0.01 --FORMAT_GEO_MAP=ddd.xxF -Xw+2c

gmt end show

Actual outcome
frame_small_area_basemap

Same study area with background map plotted via pygmt.Figure.tilemap
(modified from https://www.pygmt.org/dev/gallery/maps/tilemaps.html, last access 2024/05/16)
frame_small_area_tilemap

Expected outcome

For the middle plot, the gridlines and annotations should be moved to the position of the rounded values.

System information

  • Operating system: Windows | Linux
  • GMT version (gmt --version): 6.5.0 | 6.4.0
@yvonnefroehlich yvonnefroehlich added the bug Something isn't working label May 16, 2024
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
Development

No branches or pull requests

1 participant