I am creating topo array with this code:
using CairoMakie
using TopoPlots
function topo_array(f, times=nothing)
f = Figure()
times = nothing
data, pos = TopoPlots.example_data()
data = data[1:30,:,1]
pos = hcat([[p[1], p[2]] for p in pos]...)
pos = pos[:, 1:30]
pos ./ maximum(pos, dims=2)
axlist = []
for (ix, p) in enumerate(eachcol(pos))
x = p[1] #* 1.1
y = p[2] #* 1.1
# todo: 0.1 should go into plot config
ax = Axis(f[1, 1], width=Relative(0.09), height=Relative(0.09),
halign=x, valign=y, title = string.(ix))
# todo: add label if not nothing
push!(axlist, ax)
end
# todo: make optional + be able to specify the linewidth + color
hlines!.(axlist, Ref([0.0]), color=:gray, linewidth=0.5)
vlines!.(axlist, Ref([0.0]), color=:gray, linewidth=0.5)
times = isnothing(times) ? (1:size(data, 2)) : times
# todo: add customizable kwargs
h = lines!.(axlist, Ref(times), eachrow(data))
linkaxes!(axlist...)
hidedecorations!.(axlist)
hidespines!.(axlist)
# CairoMakie.trim!(f.layout)
f
end
topo_array(Figure())
I got this picture:
But how can I increase space between axes and avoid these white margins?
I want smth like here: