# Help me to plot point-normal equations of plane

**URL:** <https://discourse.julialang.org/t/help-me-to-plot-point-normal-equations-of-plane/86001>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [August 19, 2022, 12:33pm UTC](https://discourse.julialang.org/t/help-me-to-plot-point-normal-equations-of-plane/86001 "2022-08-19T12:33:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [August 19, 2022, 12:33pm UTC](https://discourse.julialang.org/t/help-me-to-plot-point-normal-equations-of-plane/86001/1 "2022-08-19T12:33:57Z")

</div>

Hi all,

I am able to use and modify a bit `LazySets` with `Plots` to create 2-dimension point-normal equations of a line.

```julia
using LazySets, LaTeXStrings
using Plots: plot, plot!, text, lens!, bbox
gr()
p(args...; kwargs...) = plot(xlims=(0,4), ylims=(0,4), ratio=1, lab="",
                        xlab=L"x_{1}", ylab=L"x_{2}", args...; kwargs...)
p!(args...; kwargs...) = plot!(lab="", args...; kwargs...);

p(xlims=(0,2), ylims=(0,2))
a = [1.0, 1.0]
b = 2.0

H = Hyperplane(a, b)

p!(H, linewidth=2)

# normal arrow
p!([1.0, 1.5], [1.0, 1.5], linecolor=:red, arrow=:arrow,
    linestyle=:dash, width=2, annotations=(1.15, 1.3, text(L"\textbf{n}", 10)))
p!([1.0, 0.5], [1.0, 1.5], linecolor=:red, arrow=:arrow,
    linestyle=:dash, width=2, annotations=(0.75, 1.5, text(L"P(x,y)", 10)))

annotate!([(1.5, 1.6, text(L"(a,b)", 10)), 
           (0.75, 1.0, text(L"P_{0}(x_{0},y_{0})", 10))])

scatter!([1], [1], color = "red", label="", markersize = 3)
scatter!([1.5], [1.5], color = "red", label="", markersize = 3)
scatter!([0.5], [1.5], color = "red", label="", markersize = 3)

```

I want to plot 3-dimension point-normal equations of a plane, can I still use `LazySets` ?

![Capture d’écran_2022-08-19_19-27-15](https://global.discourse-cdn.com/julialang/original/3X/a/d/adcd80dd9d49b8bc327bfcc157430b161158fd55.png)

If possible can it use `plotly() / plotlyjs()` or maybe `makie` for a bit of challenge.
