# Examples from pyvista.ImageData.extent
# ======================================

# Create a `ImageData` and show its extent.
import pyvista as pv
grid = pv.ImageData(dimensions=(10, 10, 10))
grid.extent

grid.extent = (2, 5, 2, 5, 2, 5)
grid.extent

# Note how this also modifies the grid's `offset`,
# `dimensions`, and `bounds`. Since
# we use default spacing of 1 here, the bounds match the extent exactly.
grid.offset

grid.dimensions

grid.bounds

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