AlgebraOfGraphics.jl
                                
                                 AlgebraOfGraphics.jl copied to clipboard
                                
                                    AlgebraOfGraphics.jl copied to clipboard
                            
                            
                            
                        A simpler way to plot heatmaps with independent colorbars
The following kinda works?
using GLMakie, DataFrames, AlgebraOfGraphics
df = DataFrame(;
    x = repeat(repeat(1:10, inner=10), outer =2),
    y = repeat(repeat(1:10, outer =10), outer =2),
    val= rand(200),
    l = [fill("a", 100)..., fill("b",100)...])
data(df) * mapping(:x, :y, :val, layout=:l) * visual(Heatmap) |> draw
 
but,
- it will be nice if there were a simpler way to pass the data.
- each heatmap could have his own -colobar -colormap -colorrange so that we could control the appearance for different variables (a & b here).
Thanks for that code, I was trying to figure out how to display a heatmap from a 2d array.
I agree with the issue, it would be nice to have Matrix elements in a dataframe that can be processed to a heatmap, since the heatmap function can take them as arguments.
It seems to me that a single colorbar is preferable by default.