# Examples from pyvista.DataSetFilters.glyph
# ==========================================

# Create arrow glyphs oriented by vectors and scaled by scalars.
# Factor parameter is used to reduce the size of the arrows.
import pyvista as pv
from pyvista import examples
mesh = examples.load_random_hills()
arrows = mesh.glyph(scale='Normals', orient='Normals', tolerance=0.05)
pl = pv.Plotter()
actor = pl.add_mesh(arrows, color='black')
actor = pl.add_mesh(
    mesh,
    scalars='Elevation',
    cmap='terrain',
    show_scalar_bar=False,
)
pl.show()

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