# How to plot a surface with Makie by using corner points?

**URL:** <https://discourse.julialang.org/t/how-to-plot-a-surface-with-makie-by-using-corner-points/27707>\
**Category:** Visualization\
**Tags:** plotting\
**Created:** [August 19, 2019, 9:29am UTC](https://discourse.julialang.org/t/how-to-plot-a-surface-with-makie-by-using-corner-points/27707 "2019-08-19T09:29:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manu\_Francis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/manu_francis/32/10010_2.png) [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Post date:** [August 19, 2019, 9:29am UTC](https://discourse.julialang.org/t/how-to-plot-a-surface-with-makie-by-using-corner-points/27707/1 "2019-08-19T09:29:54Z")

</div>

Hi,

I have x, y, z corner points of a plane as follows.

```julia
x = [-24.576 24.576 24.576 -24.576]
y = [20.0 20.0 20.0 20.0]
z = [-24.576 -24.576 24.576 24.576]

```

I am trying to plot the surface with Makie using following commands,

```julia
using Makie
AbstractPlotting.surface(x, z,y , color=:blue, alpha=0.5)

```

But I am getting error as following

`ERROR: No overload for Surface{...} and also no overload for trait AbstractPlotting.SurfaceLike() found! Arguments: (Scene, Array{Float64,2}, Array{Float64,2}, Array{Float64,2})`

Can anyone help me to solve this issue and plot the surface?

Thanks in Advance !  
Manu

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [August 19, 2019, 10:19am UTC](https://discourse.julialang.org/t/how-to-plot-a-surface-with-makie-by-using-corner-points/27707/2 "2019-08-19T10:19:28Z")

</div>

You can plot it as a mesh:

```julia
using Makie, GeometryTypes
x = [-24.576, 24.576, 24.576, -24.576]
y = [20.0, 20.0, 20.0, 20.0]
z = [-24.576, -24.576, 24.576, 24.576]
triangle_indices = [1, 2, 3, 3, 4, 1]
mesh(x, y, z, triangle_indices)

```

---

<div class="post-metadata">

**Author:** ![Manu\_Francis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/manu_francis/32/10010_2.png) [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Post date:** [August 19, 2019, 10:38am UTC](https://discourse.julialang.org/t/how-to-plot-a-surface-with-makie-by-using-corner-points/27707/3 "2019-08-19T10:38:16Z")

</div>

@sdanisch : Your reply is awesome and it works great. I am really thankful to you. I have a small question related to your reply. I am trying to change the colour and transparency. But it is not working? I tried like below:  
`Makie.mesh!(scene,x, y, z, triangle_indices, alpha=0.01, transparency=true)`

Could you please comment on my try?

Thanks and Regards,  
Manu

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [August 19, 2019, 12:26pm UTC](https://discourse.julialang.org/t/how-to-plot-a-surface-with-makie-by-using-corner-points/27707/4 "2019-08-19T12:26:33Z")

</div>

the alpha keyword is still not implemented ☹  
Try:

```julia
mesh(x, y, z, triangle_indices, color = (:green, 0.5), transparency = true)

```

---

<div class="post-metadata">

**Author:** ![Manu\_Francis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/manu_francis/32/10010_2.png) [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Post date:** [August 20, 2019, 3:28am UTC](https://discourse.julialang.org/t/how-to-plot-a-surface-with-makie-by-using-corner-points/27707/5 "2019-08-20T03:28:59Z")

</div>

@sdanisch : Thank you…🙂 Everything working fine 👌
