Inconsistent default central meridian of projection in modern mode

Open
#755 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia

Research direction

Reproduce the modern-mode behavior using gmtbegin, coast, grdimage!, and the linked example grid file, comparing the default Robinson projection with center = 180. Trace where coast and grdimage establish projection defaults, then verify that the central meridian is consistent and that the existing workaround is no longer needed.

Written by the indexing model from the issue text.

Description

I have found that the central meridian is not set consistently when creating plots in modern mode:

Using an example grid file, e.g.
gridfile.zip

using GMT

gmtbegin("test_grdimage.png")
coast(
    region = :g,
    projection = :Robinson,
    frame = :auto,
    land = :dimgray,
    shore = :thinner,
)
grdimage!(
    "dir.2020.1.GeeK2007.6m.nc",
    cmap = "cyclic",
    nan_alpha = true,
)
gmtend(show = true)

produces:

test_grdimage

It is fixed by projection = (; name = :Robinson, center = 180) for example. So probably grdimage is setting a different default value. Low-priority issue since there is an easy workaround. Only affects modern mode.

Dominant language
Julia
Stars
222
Forks
35
Avg merge
8h 1m
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GenericMappingTools/GMT.jl

All issues in GenericMappingTools/GMT.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.