I have two heatmaps that I would like to merge to get the amount of two quantities at once. The idea is that one level is green shaded, the other is red, thus the more the resulting plot is “Cinnamon” the more the two amounts are equal in value.
Something like this:
grid1 = rand(Float16, 5, 5) grid2 = rand(Float16, 5, 5) using CairoMakie using ColorSchemes xs = collect(range(1,stop=5)) ys = collect(range(1,stop=5)) fig1, ax1, hm1 = heatmap(xs, ys, grid1, colormap = :greens) ax = Axis(fig1[1, 1], xlabel = "X", ylabel = "Y") Colorbar(fig1[:, end+1], hm1) fig2, ax2, hm2 = heatmap(xs, ys, grid2, colormap = :reds) ax = Axis(fig2[1, 1], xlabel = "X", ylabel = "Y") Colorbar(fig2[:, end+1], hm2)
Here the merge has been done by overlaying plot 2 with a 50% transparency. Perhaps there is a better Julia way of making this kind of merged plots…