Hello,
I have difficulty overlaying a contour plot over a heatmap. Here is an example
let
f(x,y) = (x + 2y^2) * abs(sin(y) + cos(x))
p1 = heatmap(1:0.5:20, 1:0.5:20, f, alpha=0.3)
p2 = Plots.contourf(1:0.5:20, 1:0.5:20, (x,y)->10f(x,y),
c=:black, levels=[100,101], colorbar=false)
p3 = heatmap(1:0.5:20, 1:0.5:20, f, alpha=0.3)
Plots.contour!(1:0.5:20, 1:0.5:20, (x,y)->10f(x,y),
c=:black, levels=[100,101], colorbar=false)
plot(p1, p2, p3, layout =(1,3), size=(1000,350))
end
The outcome is
That is I tried to overlay the second plot over the first one, but with contour!
I got the third one, where the color distribution in the heatmap
is almost invisible. Is there a way to get a proper overlaid plot in this case?