Hi, I’m working on a simple A-star viz and was wondering if it’s possible to plot a grid on a heatmap. My current heatmap on Makie looks like:
I want it to have grids, preferably a Major grid (every 5-10 ticks) and a Minor grid (every tick).
Code:
using Makie
using ColorSchemes, Colors
arr = zeros(Int, 100,100)
arr[35:55,30] .= 1
arr[90,95] = 3
cmap = ColorScheme([colorant"white", colorant"black", colorant"green"])
f = Figure()
ax = Axis(f[1,1], xminorticksvisible=true, xminorgridvisible=true, yminorticksvisible=true, yminorgridvisible=true,
xticks=0:5:100, yticks=0:5:100, xminorticks=0:1:100, yminorticks=0:1:100)
hidedecorations!(ax, grid=false, minorgrid=false)
heatmap!(ax, arr, colormap=cmap)
If I don’t set the 1’s and 3 values (Only zeros array) I get something close to what I want: