Coloring individual tick labels in Makie

Is it possible to color individual labels in Makie?

Example:

fig, ax = scatter(1:5, 1:5)
ax.xticks = 1:5
ax.xticklabelcolor = [:white, :white, :red, :red, :white]
fig

which errors.

Context: I have this plot:

and I want to highlight some entries of the x axis of the 2nd panel as having some special property. I was going to make the labels red but this doesn’t work.

Any other suggestions for highlighting?

Another idea is to add some special text above the top spline of the second panel axis. But unfortunately I didn’t find a way to acheive this with text! while keeping the text in data coordinates. Effectively I want to plot text with y position = 4 (as axis limits is 3), but keep the plot limits to 3.

haha sorry does it even make sense what I Say? I want to put some text here:

right, I’ve solved my problem by creating a new axis on top of the axis in the layout:

so let’s keep this issue open now targetting the original question: can different tick labels be colored differently?

Yes, but you need to pass it first:

using GLMakie
fig, ax, pl = scatter(1:5, 1:5; axis=(xticks = 1:5, xticklabelcolor = [:green, :blue, :red, :red, :yellow]))

You cant switch between single color and multiple color in Makie for a plot type after its creation.

In general we don’t support multiple tick colors as that would break if you zoomed and the number of ticks changed somehow. But one can always modify the linesegments or text plots that make up the axis. It’s internal though, just mentioning it in case Simon’s suggestion doesn’t work