DataSetFilters.explode#
- DataSetFilters.explode(factor: float = 0.1)[source]#
Push each individual cell away from the center of the dataset.
- Parameters:
- factor
float, default: 0.1 How much each cell will move from the center of the dataset relative to its distance from it. Increase this number to push the cells farther away.
- factor
- Returns:
pyvista.UnstructuredGridUnstructuredGrid containing the exploded cells.
Notes#
This is similar to shrink
except that it does not change the size of the cells.
Examples#
Download Python source code | Download Jupyter notebook
>>> import numpy as np
>>> import pyvista as pv
>>> xrng = np.linspace(0, 1, 3)
>>> yrng = np.linspace(0, 2, 4)
>>> zrng = np.linspace(0, 3, 5)
>>> grid = pv.RectilinearGrid(xrng, yrng, zrng)
>>> exploded = grid.explode()
>>> exploded.plot(show_edges=True)