# Examples from pyvista.Plotter.show_bounds
# =========================================

import pyvista as pv
from pyvista import examples

mesh = pv.Sphere()
pl = pv.Plotter()
actor = pl.add_mesh(mesh)
actor = pl.show_bounds(
    grid='front',
    location='outer',
    all_edges=True,
)
pl.show()

# Control how many labels are displayed.
mesh = examples.load_random_hills()

pl = pv.Plotter()
actor = pl.add_mesh(mesh, cmap='terrain', show_scalar_bar=False)
actor = pl.show_bounds(
    grid='back',
    location='outer',
    ticks='both',
    n_xlabels=2,
    n_ylabels=2,
    n_zlabels=2,
    xtitle='Easting',
    ytitle='Northing',
    ztitle='Elevation',
)
pl.show()

# Hide labels, but still show axis titles.
pl = pv.Plotter()
actor = pl.add_mesh(mesh, cmap='terrain', show_scalar_bar=False)
actor = pl.show_bounds(
    grid='back',
    location='outer',
    ticks='both',
    show_xlabels=False,
    show_ylabels=False,
    show_zlabels=False,
    xtitle='Easting',
    ytitle='Northing',
    ztitle='Elevation',
)
pl.show()

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

