# Plotting a 3d mesh in Dolfin using \`Pyvista\`

**URL:** <https://fenicsproject.discourse.group/t/plotting-a-3d-mesh-in-dolfin-using-pyvista/12119>\
**Category:** General\
**Created:** [September 6, 2023, 12:46am UTC](https://fenicsproject.discourse.group/t/plotting-a-3d-mesh-in-dolfin-using-pyvista/12119 "2023-09-06T00:46:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![00krishna](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/00krishna/32/4234_2.png) [@00krishna](https://fenicsproject.discourse.group/u/00krishna)\
**Post date:** [September 6, 2023, 12:46am UTC](https://fenicsproject.discourse.group/t/plotting-a-3d-mesh-in-dolfin-using-pyvista/12119/1 "2023-09-06T00:46:32Z")

</div>

I was working through the “Built-in Meshes” tutorial in the `Dolfin` docs, but had trouble with plotting 3d meshes in `matplotlib`, as many people have commented on in the forum.

One recommendation was to use `Pyvista`, however, I was trying to find an example of plotting a 3d mesh from `Dolfin` in `Pyvista`. There is a good example for using `Dolfinx`, but not for `Dolfin`. In the `Dolfinx` package, setting up the mesh requires the topology and geometry. The [link](https://jsdokken.com/dolfinx-tutorial/chapter1/fundamentals_code.html) is provided here for `Dolfinx`. Does anyone have a similar link to code for using `Pyvista` to plot a `Dolfin` mesh?

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [September 6, 2023, 4:40am UTC](https://fenicsproject.discourse.group/t/plotting-a-3d-mesh-in-dolfin-using-pyvista/12119/2 "2023-09-06T04:40:37Z")

</div>

See [GitHub - jorgensd/dolfin\_pyvista\_adapter: Adapter for Pyvista for arbitrary order (discontinuous) Lagrange with Legacy Dolfin.](https://github.com/jorgensd/dolfin_pyvista_adapter)

---

<div class="post-metadata">

**Author:** ![00krishna](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/00krishna/32/4234_2.png) [@00krishna](https://fenicsproject.discourse.group/u/00krishna)\
**Post date:** [September 6, 2023, 4:46am UTC](https://fenicsproject.discourse.group/t/plotting-a-3d-mesh-in-dolfin-using-pyvista/12119/3 "2023-09-06T04:46:41Z")

</div>

Ahh okay, that makes a lot more sense. Thanks for the direction. Yeah, I can use that package.

I really appreciate your help with all of these questions :).
