Skip to content

grdimage incorrectly handling longitude coordinates #1493

@melodyjulia

Description

@melodyjulia

I tried the following code snippet with the latest GMT.jl version 1.16.0, it shows wrong latitude lines:

lon = 0:1:359
lat = -89.5:1:89.5
var = zeros(360,180)
g = mat2grid(Array(var'), x = lon, y = lat)

c = makecpt(color=:rainbow, range=(-1,1,0.2))

grdimage(g, proj=:Winkel, colorbar=false, coast=true, frame=(annot="60d", grid="60d", title="Winkel"),
         color=c, par=(MAP_FRAME_TYPE=:plain,FONT=4,FONT_TITLE=8))

showfig()

If the longitude coordinates are changed to the following:

lon = 0.5:1:359.5

the latitude lines look reasonable.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions