Skip to content

Trivariate / composite plots #562

@tpoisot

Description

@tpoisot

This is easy enough, but I need to think about the legend. Low priority.

R, G, B = L[rand(eachindex(L), 3)]

colorscale = 32

r = discretize(R, colorscale)
g = discretize(G, colorscale)
b = discretize(B, colorscale)

crange = range(0, 1, colorscale+1)

pal = [Makie.ColorTypes.RGB(x, y, z) for x in crange, y in crange, z in crange]

idx = LinearIndices(pal)

newval = similar(R, Int64)

for k in keys(newval)
    newval[k] = idx[r[k], g[k], b[k]]
end

heatmap(newval, colormap=vec(pal), colorrange=extrema(idx); axis=(; aspect=DataAspect()))
lines!(pol, color=:black)
current_figure()

Metadata

Metadata

Assignees

No one assigned

    Labels

    🎨 plottingIssue related to Makie recipes🗺️ SimpleSDMLayersChanges primarily affecting or taking place in SimpleSDMLayers

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions