Overlaying contour lines for a specific value

28 Views Asked by At

I created a scatter plot representing a ‘matrix’ of values and coloured it in using heatmap. I want to overlay a contour line on it for a specific value in this matrix but I can’t figure out how – any help would be greatly appreciated! This is the code that produces my plot:

plot = scatter(x, y, matrix, st=:heatmap, xlabel="x vals ()", ylabel="y vals ()", title="blah blah")
display(plot)
1

There are 1 best solutions below

0
Przemyslaw Szufel On

You can update the plot with a line

plt = scatter(1:5, 1:5, rand(5,5), st=:heatmap)
plot!(plt, [1.5,1.5,2.5,2.5,1.5],[1.5,2.5,2.5,1.5,1.5], color=:blue, lw=7, label=nothing)

enter image description here