# How do you use \`Plots.jl\`'s \`mesh3d\` in place of matplotlib's \`plot\_trisurf\`?

**URL:** <https://discourse.julialang.org/t/how-do-you-use-plots-jl-s-mesh3d-in-place-of-matplotlibs-plot-trisurf/96016>\
**Category:** Visualization\
**Tags:** plotting\
**Created:** [March 13, 2023, 5:39pm UTC](https://discourse.julialang.org/t/how-do-you-use-plots-jl-s-mesh3d-in-place-of-matplotlibs-plot-trisurf/96016 "2023-03-13T17:39:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgross35](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tgross35/32/38591_2.png) [@tgross35](https://discourse.julialang.org/u/tgross35)\
**Post date:** [March 13, 2023, 5:39pm UTC](https://discourse.julialang.org/t/how-do-you-use-plots-jl-s-mesh3d-in-place-of-matplotlibs-plot-trisurf/96016/1 "2023-03-13T17:39:41Z")

</div>

Hello everyone,

I’m trying to use a `mesh3d` as a drop in for `plot_trisurf`, but am struggling to get the same functionality. The difference looks like this:

```julia
plot_trisurf(X, Y, Z)

mesh3d(X, Y, Z, connections=(i, j, k))

```

And I’m not quite clear on where the `connections` tuple needs to come from. All the examples I see use hard coded values - but is there a way to autogenerate this to use `mesh3d`?

Relevant links:

- Plots.jl `mesh3d` docs: [Mesh3d · Plots](https://docs.juliaplots.org/stable/gallery/gr/generated/gr-ref047/)
- Plotly `mesh3d` docs: [Surface triangulation in Python/v3](https://plotly.com/python/v3/surface-triangulation/)
