# Examples from pyvista.DataSet.arrows
# ====================================

# Create a mesh, compute the normals and set them active.
import pyvista as pv
mesh = pv.Cube()
mesh_w_normals = mesh.compute_normals()
mesh_w_normals.active_vectors_name = 'Normals'

# Plot the active vectors as arrows. Show the original mesh as wireframe for
# context.
arrows = mesh_w_normals.arrows
pl = pv.Plotter()
_ = pl.add_mesh(mesh, style='wireframe')
_ = pl.add_mesh(arrows, color='red')
pl.show()

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

