-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
If I want to plot a region with longitude from 170 to 140 (which means 170-180 0-140, all without 140-170).
I can't give the region like this (170,140,-90,90), as GMT.jl/gmt will rise a error basemap [ERROR]: Option -R parsing failure.
. But I found that the region could be (170-360,140,-90,90) or (170,140+360,-90,90). In most case it work fine, but for large regions like (170-360,155,-90,90) there will be some strange lines...
The code that can produce the strange figures:
using GMT
function test(rlon=[170,128])
gmtbegin()
gmtfig(string("test_R_", rlon[1], "_", rlon[2]), fmt="png")
if rlon[1] > rlon[2]
rlon[1] -= 360
end
baseregion = (rlon[1], rlon[2], -90, 90)
lon = (baseregion[1] + baseregion[2]) / 2.0
proj = (name = :Robinson,
# center = [mean(baseregion[1:2]) mean(baseregion[3:4])],
center = lon,)
basemap(region=baseregion, proj=proj, frame=(axes = :WSen,),
figsize=12, )
topo = makecpt("-H", color=:geo, range=(-8800, 8800,), continuous=true);
grdimage!("@earth_relief_20m.grd", region=baseregion,
nan_alpha=true,
color=topo,
colorbar=true)
coast(region=baseregion,
borders=(type = :a, pen = (0.06, :black, "--")),
shore=(type = 1, pen = (0.6, :black,)),
# Vd=1,
)
gmtend()
end
for lon_right = 5:10:170
test([170,lon_right])
end
It seems starts from (170,151) the strange lines appear. I don't know if this is related to #357
Metadata
Metadata
Assignees
Labels
No labels