# How can I project level curves onto the axis planes in 3d?

**URL:** <https://discourse.julialang.org/t/how-can-i-project-level-curves-onto-the-axis-planes-in-3d/53016>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [January 7, 2021, 11:51pm UTC](https://discourse.julialang.org/t/how-can-i-project-level-curves-onto-the-axis-planes-in-3d/53016 "2021-01-07T23:51:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![phdemetri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phdemetri/32/20855_2.png) [@phdemetri](https://discourse.julialang.org/u/phdemetri)\
**Post date:** [January 7, 2021, 11:51pm UTC](https://discourse.julialang.org/t/how-can-i-project-level-curves-onto-the-axis-planes-in-3d/53016/1 "2021-01-07T23:51:52Z")

</div>

I’m interested in plotting the level curves of a surface onto the xy plane. Here is an example of what I want to achieve

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/7/d7ec4064d3b4a88b593c786b58e563596de91f63.jpeg)

I’ve got some code to make the surface and plot it already. How can I modify my code to get my desired result?

```julia
using Plots
using LinearAlgebra
using Distributions
pyplot()

function expit(x)
    1.0 / (1.0 + exp(-x))
end

function make_data()
    N,p = 1000, 2
    μ = zeros(p)

    X = rand(Normal(), N)
    X = [ones(N) X]
    β = [-0.8, 0.2]
    η = X*β;

    θ = expit.(η)
    dgp = Binomial.(1,θ)
    y = rand.(dgp);
    X,y
end

X, y = make_data();

function LL(b0, b1, X, y)
    
    density = Binomial.(1, expit.(X*[b0,b1]))
    
    sum(loglikelihood.(density, y))
    
end

b1 = -8:0.1:8
b0 = -8:0.1:8
z = [LL(i,j,X,y) for i in b0, j in b1];

plot(b0, b1, z, st = :surface, camera = (-30, 15))

```
