MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.38k stars 302 forks source link

change the axis ticklabelcolor #3269

Open jaehongpark-neuro opened 11 months ago

jaehongpark-neuro commented 11 months ago

Hi, I used to use change the ticklabelcolor as recommended before.

ax.xaxis.attributes.ticklabelcolor[] = Makie.to_color.([:grey,:green])

However, I recently use new version of Makie, then this line got error.

ERROR: MethodError: Cannot `convert` an object of type Vector{ColorTypes.RGBA{Float32}} to an object of type ColorTypes.RGBA{Float32}
Closest candidates are:
  convert(::Type{C}, ::ColorTypes.Color, ::Any) where C<:ColorTypes.TransparentColor at C:\Users\hongs\.julia\packages\ColorTypes\1dGw6\src\conversions.jl:78
  convert(::Type{C}, ::C) where C<:ColorTypes.Colorant at C:\Users\hongs\.julia\packages\ColorTypes\1dGw6\src\conversions.jl:72
  convert(::Type{C}, ::ColorTypes.Colorant) where C<:ColorTypes.Colorant at C:\Users\hongs\.julia\packages\ColorTypes\1dGw6\src\conversions.jl:73

Any helps?

Thanks

jkrumbiegel commented 11 months ago

@SimonDanisch this is a real-world case of wanting to change the color type of a primitive that we talked about the other day, I think?

ffreyer commented 3 weeks ago

Just to note, you can do per-string colors from text but you can't go from a global color to a per-string color afterwards