# Viskex available options, saving screenshot - labeling meshtags

**URL:** <https://fenicsproject.discourse.group/t/viskex-available-options-saving-screenshot-labeling-meshtags/15621>\
**Category:** General\
**Created:** [August 22, 2024, 7:09pm UTC](https://fenicsproject.discourse.group/t/viskex-available-options-saving-screenshot-labeling-meshtags/15621 "2024-08-22T19:09:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leshinka](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/leshinka/32/5789_2.png) [@leshinka](https://fenicsproject.discourse.group/u/leshinka)\
**Post date:** [August 22, 2024, 7:09pm UTC](https://fenicsproject.discourse.group/t/viskex-available-options-saving-screenshot-labeling-meshtags/15621/1 "2024-08-22T19:09:10Z")

</div>

I am using viskex to plot my mesh and was wondering what options are available. First of all, viskex makes plotting mesh tags much easier than using PyVista natively. However, I am unclear how to do what PyVista supports such as:

- saving screenshot of visualization
- labeling points in certain region for example adding a label to center of mass of a given mesh tag

---

<div class="post-metadata">

**Author:** ![francesco-ballarin](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@francesco-ballarin](https://fenicsproject.discourse.group/u/francesco-ballarin)\
**Post date:** [August 26, 2024, 6:28am UTC](https://fenicsproject.discourse.group/t/viskex-available-options-saving-screenshot-labeling-meshtags/15621/2 "2024-08-26T06:28:11Z")

</div>

Hi @leshinka,  
thanks for your interest in `viskex`.

The tutorials show the usage of `viskex.dolfinx.plot_*` functions. Those functions create a `pyvista` plotter, and automatically call `show()` on it.

If you would like to postprocess the plotter in any way, then use the internal `viskex.DolfinxPlotter.plot_mesh(mesh)`. This returns a `pyvista` plotter, but does not call `show()` on it, hence you can process it any way you want.

Small snippet

```auto
# assuming the mesh is defined beforehand
# assuming each line of code to be in a separate cell of the notebook

# Cell 1
output1 = viskex.dolfinx.plot_mesh(mesh)
# show the trame widget

# Cell 2
type(output1)
# prints NoneType

# Cell 3
output2 = viskex.DolfinxPlotter.plot_mesh(mesh)
# no trame widget is displayed

# Cell 4
type(output2)
# prints pyvista.plotting.plotter.Plotter

```

---

<div class="post-metadata">

**Author:** ![leshinka](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/leshinka/32/5789_2.png) [@leshinka](https://fenicsproject.discourse.group/u/leshinka)\
**Post date:** [August 26, 2024, 4:19pm UTC](https://fenicsproject.discourse.group/t/viskex-available-options-saving-screenshot-labeling-meshtags/15621/3 "2024-08-26T16:19:25Z")

</div>

This solves my problem. Is there a way to visualize a scalar field obtained from reading an adios2 file obtained in fenicsx?

---

<div class="post-metadata">

**Author:** ![francesco-ballarin](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@francesco-ballarin](https://fenicsproject.discourse.group/u/francesco-ballarin)\
**Post date:** [August 26, 2024, 6:32pm UTC](https://fenicsproject.discourse.group/t/viskex-available-options-saving-screenshot-labeling-meshtags/15621/4 "2024-08-26T18:32:23Z")

</div>

Once you read it in in `dolfinx.fem.Function`, you will be able to plot it regardless of where the actual data store in the function comes from.
