MakieOrg / GeoMakie.jl

Geographical plotting utilities for Makie.jl
https://geo.makie.org
MIT License
173 stars 25 forks source link

Artefact with Rasters #171

Open ThomasAuriel opened 1 year ago

ThomasAuriel commented 1 year ago

When using GeoMakie with Rasters.jl, I have artifacts on the final figure.

There is a line continuing the value from -180 to 180. It happens with contourf function but also, and more surprising, with surface function. output_2020-01-01T00:00:00

Here is the code I'm using:

        val = ds[:,:,1]

        fig = Figure()

        ax = GeoAxis(fig[1,1]; aspect = DataAspect(), title=title, dest = "+proj=robin", coastlines = true)
        p = surface!(ax, val; colormap= :darktest, shading = false, colorrange=(-40,40),  interpolate=false)
        cb = Colorbar(fig[1, 2], p, label=string(product.unit))
        cb.alignmode = Mixed(right = 0)

        ax = GeoAxis(fig[2,1]; aspect = DataAspect(), title=title, dest = "+proj=robin", coastlines = true)
        p = contourf!(ax, val; colormap= :darktest, shading = false, colorrange=(-40,40), interpolate=false)
        cb = Colorbar(fig[2, 2], p, label=string(product.unit))
        cb.alignmode = Mixed(right = 0)

        resize_to_layout!(fig)
        save(filepath, fig)

I'm not sure it's the same issue than this ticket : https://github.com/MakieOrg/GeoMakie.jl/issues/119

asinghvi17 commented 5 months ago

Looks like something similar. I'm not sure if this is still an issue with the current Float64 handling?