# Plot() command option to show mesh connectivity

**URL:** <https://community.freefem.org/t/plot-command-option-to-show-mesh-connectivity/47>\
**Category:** Feature Request\
**Created:** [May 7, 2019, 5:53pm UTC](https://community.freefem.org/t/plot-command-option-to-show-mesh-connectivity/47 "2019-05-07T17:53:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arousta](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@arousta](https://community.freefem.org/u/arousta)\
**Post date:** [May 7, 2019, 5:53pm UTC](https://community.freefem.org/t/plot-command-option-to-show-mesh-connectivity/47/1 "2019-05-07T17:53:20Z")

</div>

I’m writing a code which calculates a lot of geometric info about mesh (like for a flux limiter). It would be very very useful that the plot(Th) had an option to show vertices/cells/borders numbers. Like the figure in documentation:  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/3e10999ae907565f6cd7ecc6ec059b47388a7bae.png)

---

<div class="post-metadata">

**Author:** ![mojtaba.barzegari](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/mojtaba.barzegari/32/20_2.png) [@mojtaba.barzegari](https://community.freefem.org/u/mojtaba.barzegari)\
**Post date:** [May 8, 2019, 8:56am UTC](https://community.freefem.org/t/plot-command-option-to-show-mesh-connectivity/47/2 "2019-05-08T08:56:19Z")

</div>

Hi,

This option is not available in FreeFem++, but you can do this in Gmsh. In order to achieve this, you should save your FreeFem++ mesh (using savemesh function) and load it in Gmsh. Then turn on desired mesh display options. The output would be something like this:

 ![Screenshot%20from%202019-05-08%2010-53-39](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/daeb6044c56f93787abe57e53f11b34d6cc04e17.png)

---

<div class="post-metadata">

**Author:** ![arousta](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@arousta](https://community.freefem.org/u/arousta)\
**Post date:** [May 8, 2019, 12:17pm UTC](https://community.freefem.org/t/plot-command-option-to-show-mesh-connectivity/47/3 "2019-05-08T12:17:32Z")

</div>

Thanks a lot! This would also be very useful. I tried savemesh(Th,“A.gmsh”) and I see it generated two files A.gmsh/A.gmsh.gmsh. But when I load A.gmsh in Gmsh gives syntax error! (Freefem 3.61/Gmsh 4.3.0).

Anyways, it would be great to have it built-in Freefem.

---

<div class="post-metadata">

**Author:** ![mojtaba.barzegari](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/mojtaba.barzegari/32/20_2.png) [@mojtaba.barzegari](https://community.freefem.org/u/mojtaba.barzegari)\
**Post date:** [May 8, 2019, 12:58pm UTC](https://community.freefem.org/t/plot-command-option-to-show-mesh-connectivity/47/4 "2019-05-08T12:58:52Z")

</div>

You should save it with .mesh file extension: savemesh(Th,“A.mesh”);

---

<div class="post-metadata">

**Author:** ![arousta](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@arousta](https://community.freefem.org/u/arousta)\
**Post date:** [May 9, 2019, 8:24am UTC](https://community.freefem.org/t/plot-command-option-to-show-mesh-connectivity/47/5 "2019-05-09T08:24:50Z")

</div>

Worked, thanks 👌👌👌
