The scale-change of "cgrad" is invalidated when colorschemes are jointed

Julia 1.9.0 downloaded from the official

(Sorry for my poor English)

I want to join 2 colorschemes, before which each scale is change (:log).

cs1 = reverse( cgrad( palette( [:red, :orange, :yellow, :lawngreen], 100 ), scale=:log ) )
cs2 = cgrad( palette( [:navyblue, :deepskybkue2, :lime, :lawngreen], 100 ), scale=:log )

cs_com = zeros(RGBA{Float64}, 200)
cs_com[1:100] .= cs1
cs_com[101:end] .= cs2

But, outputted colorscheme is invalidated scale-change (scale=:log), it means that, cs_com is JUST equal to
palette( [:navyblue, :deepskybkue2, :lime, :lawngreen, :lawngreen, :yellow, :orange, :red], 200 )

Why? and, please let me know how to combine colorschemes.
(I posted the same quastion on Github.)

You could try:

cs12 = [get(cs1, range(0,1,100)); get(cs2, range(0,1,100))]
Here is a MWE
using Plots

cs1 = reverse(cgrad( palette([:red,:orange,:yellow,:lawngreen], 100), scale=:log))
cs2 = cgrad( palette([:navyblue,:DeepSkyBlue2,:lime,:lawngreen], 100), scale=:log)
cs12 = [get(cs1, range(0, 1, 100)); get(cs2, range(0, 1, 100))]
M = sin.((0:999)' .* (0:999) / 20000)
heatmap(M, color=cs12)


1 Like

I can get Color-Schemes I want !
Thank you for your advice!