Hello! I’m testing writing reports for my class but I’m having trouble adding a colorbar to my lilaq colormesh, instead being side by side it is one above the other. I solved the positioning by changing the columns spacing but I ran into another problem, the bar isn’t the same height as the colormesh. How can I solve it?
#subpar.grid(
// (a) Histogram
figure(
lq.diagram(
width: 7cm,
height: 5.5cm,
xlabel: [Joint angle (rad)],
ylabel: [Count],
lq.bar(bin-mids, hist-d.counts, width: bin-w, fill: c-navy),
),
caption: [Marginal distribution of joint angles],
),
<eda-hist>,
// (b) Correlation heatmap (z[y_idx][x_idx] = corr_d.values[row][col])
figure(
{
// TODO: adjust colobar not side by side with heatmap
let cm = lq.colormesh(
idx20,
idx20,
corr-d.values,
map: color.map.viridis,
)
lq.diagram(
width: 6.5cm,
height: 6.5cm,
xlabel: [Joint index],
ylabel: [Joint index],
xaxis: (tick-distance: 5),
yaxis: (tick-distance: 5),
cm,
)
h(2mm)
lq.colorbar(cm, thickness: 3mm)
},
caption: [Absolute Pearson correlation],
),
<eda-heatmap>,
columns: (1fr, 1.3fr),
caption: [Exploratory data analysis: (a) marginal distribution of training joint angles and (b) pairwise absolute correlation heatmap (joint indices 0–19 defined in @tab-joints).],
label: <fig-eda>,
)