x = range(-50,50,length=1000)
y = range(0,30,length=1000)
f(x,y) = x/3+log(1000+((x-10)^2+(2y)^2-15^2)^2);
z = f.(transpose(x), y)
contour(x, y, z, levels=0:2.5:40,
fill=(true, cgrad(:matter, categorical = true)), clim=(0.0,40.0))
works beautifully.
But I need a way to make the same plot with contours given by lines (xs, ys).
The Contours.jl
package provides these contour lines. So, I can plot them:
using Contour
cs = contours(x, y, z 2.5:2.5:40);
let
plot()
for (i,c) in enumerate(cs.contours)
lev = c.level
for l in c.lines
x, y = coordinates(l)
plot!(x, y, lab="", seriescolor=i)
end
end
plot!()
end
I just do not find a way to fill the range in between. Any suggestions?