Annotation to figure with 2 Subplots

I try to make a Plot with 2 Subplots and use the gr() backend. The first (p1) is a 3D surface plot and the 2. (p2) a 2D contour plot. The axis of both subplots are also different. I tried to put the annotation in the second subplot but it didn’t appear and I get the error “z is not defined” (p2 is 2D).
I think I have to do

p3= plot(p1,p2, layout = grid(2, 1,heights=[0.6 ,0.4]), annotate(???))

But I can’t get it to work. Which coordinates should I take, the data coordinates from p1 or p2? Or can I do something like bottom_right for the whole figure? I searched the doc but didn’t find the Answer.

Any help is highly appreciated

I changed it a little bit and added the annotation directly to plot 2 (not afterward with annotate!)

function plotgraph(Kp_col, Ki_col)

loss = find_loss(Kp_col, Ki_col)

p1 = plot(Kp_col, Ki_col, loss, st=:surface, c= cgrad(:viridis,rev=true), camera=(70,25),
    xlabel="Kp", ylabel="Ki", zlabel="Loss", xrotation=45,right_margin = #,yrotation=45)
p2 = contour(Ki_col, Kp_col, loss', c= cgrad(:viridis,rev=true), xlabel="Ki", 
     ylabel="Kp",  xlims=(10,74), annotations=(75, 3690, Plots.text("Loss", 8, :left))) #, legend = :none)
p3= plot(p1,p2, layout = grid(2, 1,heights=[0.6 ,0.4]))

return p3


Now I don’t get the error “z not defined” but a warning:
┌ Warning: Unused font arg: Plots.PlotText(“Loss”, Plots.Font(“sans-serif”, 8, :left, :vcenter, 0.0, RGB{N0f8}(0.0,0.0,0.0))) (Plots.PlotText)
└ @ Plots ~/.julia/packages/Plots/SjqWU/src/components.jl:286

No idea what to do anymore. Can Anybody help?

@hardy, please read the guidelines here and post a MWE. Thank you.

I’m really embarrassed now, but I just forgot a zero in a number (one of the coordinates). So my annotation was out of sight. I checked the code over and over but didn’t notice it.
Sorry for wasting your time.