# GeoMakie meshimage colormap not applying and ticks overlapping

**URL:** <https://discourse.julialang.org/t/geomakie-meshimage-colormap-not-applying-and-ticks-overlapping/115903>\
**Category:** Visualization\
**Tags:** makie, plot, geomakie\
**Created:** [June 20, 2024, 5:25am UTC](https://discourse.julialang.org/t/geomakie-meshimage-colormap-not-applying-and-ticks-overlapping/115903 "2024-06-20T05:25:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AtomsForHire](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@AtomsForHire](https://discourse.julialang.org/u/AtomsForHire)\
**Post date:** [June 20, 2024, 5:25am UTC](https://discourse.julialang.org/t/geomakie-meshimage-colormap-not-applying-and-ticks-overlapping/115903/1 "2024-06-20T05:25:53Z")

</div>

Hi, this is a continuation of a previous question I’ve had on here.

At the moment I have some code like this to produce a mollweide projection image of the whole sky:

```julia-auto
using Healpix
using GeoMakie

function main()
    f = Figure()
    ax = GeoAxis(f[1, 1]; dest="+proj=moll", yticklabelpad=100.0)
    ax.xticksvisible = true
    nside = 8
    m = HealpixMap{Float64,RingOrder}(nside)
    m.pixels[:] = 1:length(m.pixels)
    rectimg = equirectangular(m)

    meshimage!(ax, -180 .. 180, -90 .. 90, reverse(rectimg[1]; dims=1); color=:jet, colormap=:jet, npoints=1000)

    wait(display(f))
end

main()

```

which nets this:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/9/695248f37b64ea5ed4b94bdfa9230175b7712489.jpeg)

The default `colormap` is viridis, as stated in the Makie `mesh` documentation.

# Q1

I would like to plot with a different colormap if possible, as seen in the example code, I’ve tried passing in `colormap` and `color` kwargs (both seperately and together) and it seems like they are ignored. Is there another method for setting the colormap?

# Q2

I would also like the latitude ticks to not overlap with the image if possible, I’ve tried setting `yticklabelpad=100.0` which seems to be ignored, same with trying to make the longitude ticks visible with `xticksvisible=true` and `xticklabelsvisible=true`.

Thanks.

---

<div class="post-metadata">

**Author:** ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)\
**Post date:** [June 20, 2024, 7:36pm UTC](https://discourse.julialang.org/t/geomakie-meshimage-colormap-not-applying-and-ticks-overlapping/115903/2 "2024-06-20T19:36:31Z")

</div>

This looks like an error with meshimage, which I should be able to correct in GeoMakie.

That being said, you can get around for this by now using something like:

```julia
    mi = meshimage!(ax, -180 .. 180, -90 .. 90, reverse(rectimg[1]; dims=1); npoints=1000)
    mi.plots[1].colormap = :jet

```

which works for me.

Also, you might use a perceptually smoother colormap like `:turbo` instead of jet, which is known to be misleading (see e.g. [this article](https://gorelik.net/2020/08/17/what-is-the-biggest-problem-of-the-jet-and-rainbow-color-maps-and-why-is-it-not-as-evil-as-i-thought/)) 🙂

---

<div class="post-metadata">

**Author:** ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)\
**Post date:** [June 20, 2024, 7:50pm UTC](https://discourse.julialang.org/t/geomakie-meshimage-colormap-not-applying-and-ticks-overlapping/115903/3 "2024-06-20T19:50:30Z")

</div>

About your second question: a Mollweide projection can’t actually have longitude ticks, since the longitude lines end in a singularity at the top and bottom of the projection. The latitude lines are an issue that I’ll look into, though!

---

<div class="post-metadata">

**Author:** ![AtomsForHire](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@AtomsForHire](https://discourse.julialang.org/u/AtomsForHire)\
**Post date:** [June 22, 2024, 12:48am UTC](https://discourse.julialang.org/t/geomakie-meshimage-colormap-not-applying-and-ticks-overlapping/115903/4 "2024-06-22T00:48:56Z")

</div>

Thank you, looks much better with `:turbo`, and I didn’t know there were some problems with jet before, interesting!
