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

Inconsistent default central meridian of projection in modern mode #755

Open
adigitoleo opened this issue Nov 15, 2021 · 1 comment
Open

Comments

@adigitoleo
Copy link

adigitoleo commented Nov 15, 2021

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.

@joa-quim
Copy link
Member

Don't know why this is happening and likely not a GMT.jl error. The coast command above doesn't explicitly set the central meridian (only through the region option) and grdimage should inherit it. It does in classic mode and in GMT CLI, but not in GMT.jl modern mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants