# Examples from pyvista.ExplicitStructuredGrid.neighbors
# ======================================================

import pyvista as pv
from pyvista import examples
grid = examples.load_explicit_structured()
cell = grid.extract_cells(31)
ind = grid.neighbors(31)
neighbors = grid.extract_cells(ind)
pl = pv.Plotter()
_ = pl.add_axes()
_ = pl.add_mesh(cell, color='r', show_edges=True)
_ = pl.add_mesh(neighbors, color='w', show_edges=True)
pl.show()

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

