@Leon Just because those figures from the paper look nice I tried to replicate them with GeoMakie which is about to also have some major changes. For now, the following kinda works with scatters, (heatmaps and surfaces still are a problem, which I hope also get fixed in the next Makie release, don’t know really, @sdanisch probably will know better). Either way, here the code and the output
using GeoMakie, CairoMakie
using Proj4, GeometryBasics, GeoDatasets
lonmask, latmask, data = GeoDatasets.landseamask(; resolution = 'c', grid = 10)
fig = Figure(resolution = (900, 1000), fontsize = 22)
ax1 = Axis(fig[1, 1], aspect = DataAspect(), title = "Projection: Goode H")
ax2 = Axis(fig[2, 1], aspect = DataAspect())
ax3 = Axis(fig[3, 1:2], xlabel = "date", ylabel = "y label")
# all this will go in the next release of GeoMakie
trans = Proj4.Transformation("+proj=longlat +datum=WGS84",
"+proj=igh_o +lon_0=-160", always_xy = true)
ptrans = Makie.PointTrans{2}(trans)
ax1.scene.transformation.transform_func[] = ptrans
ax2.scene.transformation.transform_func[] = ptrans
# add some limits, still it needs to be manual
lats = -90:30.0:90 |> collect
lons = -180:30.0:180 |> collect
# avoid PROJ wrapping 180 to -180
lons[end] = prevfloat(lons[end])
points = [Point2f0(lon, lat) for lon in lons, lat in lats]
xytrans = Makie.apply_transform(ptrans, points)
function checkInfs(xy)
xy != [Inf, Inf] && xy != [-Inf, -Inf] && xy[1] != Inf && xy[2] != Inf && xy[1] != -Inf && xy[2] != -Inf
end
xytransClean = [1.15xytrans[i] for i in 1:prod(size(xytrans)) if checkInfs(xytrans[i])]
rectLimits = FRect2D(xytransClean)
limits!(ax1, rectLimits)
limits!(ax2, rectLimits)
# up to here things will go into the GeoMakie internals
field = [Point3f(lonmask[i], latmask[j], 0) for i = 1:3:length(lonmask) for j = 1:3:length(latmask)]
color1 = [Float64(data[i, j]) == 0.0 ? -rand() : Float64(data[i, j]) for i = 1:3:length(lonmask) for j = 1:3:length(latmask)]
color2 = [Float64(data[i, j]) == 0.0 ? -1 - rand() : Float64(data[i, j]) for i = 1:3:length(lonmask) for j = 1:3:length(latmask)]
mncolor = minimum(minimum.([color1, color2]))
mxcolor = maximum(maximum([color1, color2]))
hm = scatter!(ax1, field, color = color1, colorrange = (mncolor, mxcolor),
colormap = :CMRmap, markersize = 3)
scatter!(ax2, field, color = color2, colorrange = (mncolor, mxcolor),
colormap = :CMRmap, markersize = 3)
scatterlines!(ax3, 1 .. 10, x -> x^2)
Colorbar(fig[1:2, 2], hm, label = "some random label", width = 40, height = Relative(0.75))
hidedecorations!(ax1)
hidedecorations!(ax2)
hidespines!(ax1)
hidespines!(ax2)
save("GoodH.png", fig)
fig