# Examples from pyvista.Plotter.add_north_arrow_widget
# ====================================================

# Use a north arrow as the orientation widget.
import pyvista as pv
from pyvista import examples
terrain = examples.download_st_helens().warp_by_scalar()
pl = pv.Plotter()
actor = pl.add_mesh(terrain)
widget = pl.add_north_arrow_widget()
pl.enable_terrain_style(mouse_wheel_zooms=True)
pl.show()

# Distinguish the top and bottom of the arrow by coloring the top
# face a lighter shade and the bottom face a darker shade of the
# side color.
pl = pv.Plotter()
_ = pl.add_mesh(pv.Sphere())
widget = pl.add_north_arrow_widget(
    color='royalblue',
    top_color='lightsteelblue',
    bottom_color='midnightblue',
)
pl.show()

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

