Align X axis of heatmap and line plot


#1

Hi,

I am trying to make subplots of heatmap and line plot. I want to get a square and larger heatmap on top of the thin line plot that are aligned with x axis. The image I attached is what I can get so far. I was trying to adjust the widths and heights but I couldn’t get it right.

gr()
#heatmap
x=rand(150, 150)
p1=heatmap(x,aspect_ratio=1)
#line plot
y=rand(150)
p2=plot(y, legend=false)

plot(p1, p2, layout = grid(2, 1, widths = [0.9,0.9], heights=[0.9,0.1]))

Thank you for helping!


#2

Bug :frowning: