(Plots) how to set color of ticks?

How to set color of ticks?
Not font or axis, only ticks.

Upd: using Plots.jl (gr backend)

Like this:

Using which plotting package?

Plots.jl (gr backend)

1 Like

According to the docs that’s foreground_color_axis, although looking at

plot(rand(10), foreground_color_axis = :red)

that seems to change the color of all x and y axis ticks, whereas based on your image you just want to change some ticks? I think if that’s what you want to do it’s unlikely that there’s a keyword that can do this for you, you’re probably better off just trying to hack it by drawing over your plot?

1 Like

I agree with Nils and the hack will be easier for most Plots.jl backends, including gr(), if the ticks are inside the plotting boundaries.

For example:

1 Like

Thank you this works for me.

Yes, I understand how to do it inside plot. It’s fine just to make one color.

You can then use as many colors as you want.