# Examples from pyvista.ImageData.offset
# ======================================

# Create a `ImageData` and show that the offset is zeros by default.
import pyvista as pv
grid = pv.ImageData(dimensions=(10, 10, 10))
grid.offset

# The offset defines the minimum extent.
grid.extent

# Set the offset to a new value for all axes.
grid.offset = 2
grid.offset

# Show the extent again. Note how all values have increased by the offset value.
grid.extent

# Set the offset for each axis separately and show the extent again.
grid.offset = (-1, -2, -3)
grid.extent

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

